printfError function
void
printfError(
- Object? data, {
- String? tag,
- Object? error,
- StackTrace? stackTrace,
- 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),
);
}
}