error static method
Logs an error message tagged with the given tag.
Optionally includes an error object and stackTrace.
Implementation
static void error(
String tag,
String message, [
Object? error,
StackTrace? stackTrace,
]) {
// ignore: avoid_print
print('[${DateTime.now().toIso8601String()}] [ERROR] [$tag] $message');
if (error != null) {
// ignore: avoid_print
print(error);
}
if (stackTrace != null) {
// ignore: avoid_print
print(stackTrace);
}
}