error static method
Logs an error message to the console.
It will only print if your app's environment is in debug mode.
You can override this by setting alwaysPrint = true.
Implementation
static void error(dynamic message, {bool alwaysPrint = false}) {
if (message is Exception) {
_loggerPrint(message.toString(), 'error', alwaysPrint);
return;
}
_loggerPrint(message, 'error', alwaysPrint);
}