error static method

void error(
  1. String message, {
  2. String? tag,
  3. Object? error,
  4. StackTrace? stackTrace,
})

Log an error message (red).

Implementation

static void error(String message, {String? tag, Object? error, StackTrace? stackTrace}) {
  if (!enableLogging) return;
  final content = '❌ ${tag != null ? "[$tag] " : ""}$message';
  _log(content, name: 'ERROR', error: error, stackTrace: stackTrace);
}