getLogTextColor static method
Return log text color based on diagnostic level
.
Implementation
static Color getLogTextColor(BuildContext context, DiagnosticLevel level) =>
switch (level) {
DiagnosticLevel.hidden => Colors.grey,
DiagnosticLevel.fine => Colors.grey,
DiagnosticLevel.debug => Theme.of(context).colorScheme.onSurface,
DiagnosticLevel.info => Theme.of(context).colorScheme.onSurface,
DiagnosticLevel.warning => Colors.orange,
DiagnosticLevel.hint => Colors.grey,
DiagnosticLevel.summary => Theme.of(context).colorScheme.onSurface,
DiagnosticLevel.error => Theme.of(context).colorScheme.error,
DiagnosticLevel.off => Colors.purple,
};