themeData property

ThemeData get themeData

A ThemeData built from palette, for the console's MaterialApp.

Implementation

ThemeData get themeData {
  final colors = palette;
  final base = switch (this) {
    DevConsoleTheme.dark => ThemeData.dark(),
    DevConsoleTheme.light => ThemeData.light(),
  };

  return base.copyWith(
    scaffoldBackgroundColor: colors.background,
    dividerColor: colors.divider,
    appBarTheme: base.appBarTheme.copyWith(
      backgroundColor: colors.appBar,
      foregroundColor: colors.onSurface,
    ),
  );
}