LogViewerTheme.fallback constructor

LogViewerTheme.fallback(
  1. ColorScheme scheme
)

Default colors for scheme: the trace, debug, info and error levels take scheme colors; Material has no colors for warning and fatal, so those are constant.

Implementation

factory LogViewerTheme.fallback(ColorScheme scheme) {
  final isDark = scheme.brightness == Brightness.dark;
  return LogViewerTheme(
    traceColor: scheme.outlineVariant,
    debugColor: scheme.outline,
    infoColor: scheme.primary,
    warningColor: Colors.deepOrangeAccent,
    errorColor: scheme.error,
    fatalColor: Colors.purple,
    warningBackground: isDark ? const Color(0xFF201300) : const Color(0xFFFFFDE7),
    errorBackground: isDark ? const Color(0xFF200000) : scheme.error.withAlpha(50),
  );
}