printfError function

void printfError(
  1. Object? data, {
  2. String? tag,
  3. Object? error,
  4. StackTrace? stackTrace,
  5. PrintfStyle? style,
})

Implementation

void printfError(
  Object? data, {
  String? tag,
  Object? error,
  StackTrace? stackTrace,
  PrintfStyle? style,
}) {
  printf(
    data,
    tag: tag,
    level: PrintfLevel.error,
    style: style ?? PrintfStyle.error,
  );
  if (error != null) {
    printf(error, tag: tag, level: PrintfLevel.error, style: PrintfStyle.error);
  }
  if (stackTrace != null) {
    printf(
      stackTrace,
      tag: tag,
      level: PrintfLevel.error,
      style: const PrintfStyle(foreground: Colors.red, italic: true),
    );
  }
}