diff --git a/lib/main.dart b/lib/main.dart index d4404c859..d34eb455f 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -529,7 +529,7 @@ class _MaterialAppWithThemeState extends ConsumerState theme: ThemeData( extensions: [colorScheme], highlightColor: colorScheme.highlight, - brightness: Brightness.light, + brightness: colorScheme.brightness, fontFamily: GoogleFonts.inter().fontFamily, unselectedWidgetColor: colorScheme.radioButtonBorderDisabled, // textTheme: GoogleFonts.interTextTheme().copyWith( diff --git a/lib/utilities/theme/chan_colors.dart b/lib/utilities/theme/chan_colors.dart index eada7cc45..f9ea1bb54 100644 --- a/lib/utilities/theme/chan_colors.dart +++ b/lib/utilities/theme/chan_colors.dart @@ -4,6 +4,8 @@ import 'package:stackwallet/utilities/theme/color_theme.dart'; class ChanColors extends StackColorTheme { @override ThemeType get themeType => ThemeType.chan; + @override + Brightness get brightness => Brightness.light; @override Color get background => const Color(0xFFF7F7F7); diff --git a/lib/utilities/theme/color_theme.dart b/lib/utilities/theme/color_theme.dart index 4d137dcfe..f04a81932 100644 --- a/lib/utilities/theme/color_theme.dart +++ b/lib/utilities/theme/color_theme.dart @@ -63,6 +63,7 @@ extension ThemeTypeExt on ThemeType { abstract class StackColorTheme { ThemeType get themeType; + Brightness get brightness; Color get background; Color get backgroundAppBar; diff --git a/lib/utilities/theme/dark_colors.dart b/lib/utilities/theme/dark_colors.dart index e91c7d126..fbbf113ef 100644 --- a/lib/utilities/theme/dark_colors.dart +++ b/lib/utilities/theme/dark_colors.dart @@ -4,6 +4,8 @@ import 'package:stackwallet/utilities/theme/color_theme.dart'; class DarkColors extends StackColorTheme { @override ThemeType get themeType => ThemeType.dark; + @override + Brightness get brightness => Brightness.dark; @override Color get background => const Color(0xFF2A2D34); diff --git a/lib/utilities/theme/forest_colors.dart b/lib/utilities/theme/forest_colors.dart index 62e7f029a..d6854d6e8 100644 --- a/lib/utilities/theme/forest_colors.dart +++ b/lib/utilities/theme/forest_colors.dart @@ -4,6 +4,8 @@ import 'package:stackwallet/utilities/theme/color_theme.dart'; class ForestColors extends StackColorTheme { @override ThemeType get themeType => ThemeType.forest; + @override + Brightness get brightness => Brightness.light; @override Color get background => const Color(0xFFF3FAF5); diff --git a/lib/utilities/theme/fruit_sorbet_colors.dart b/lib/utilities/theme/fruit_sorbet_colors.dart index 548280933..a13985a93 100644 --- a/lib/utilities/theme/fruit_sorbet_colors.dart +++ b/lib/utilities/theme/fruit_sorbet_colors.dart @@ -4,6 +4,8 @@ import 'package:stackwallet/utilities/theme/color_theme.dart'; class FruitSorbetColors extends StackColorTheme { @override ThemeType get themeType => ThemeType.fruitSorbet; + @override + Brightness get brightness => Brightness.light; @override Color get background => Colors.transparent; diff --git a/lib/utilities/theme/light_colors.dart b/lib/utilities/theme/light_colors.dart index 8c9b4dcc5..b42f2dd9a 100644 --- a/lib/utilities/theme/light_colors.dart +++ b/lib/utilities/theme/light_colors.dart @@ -4,6 +4,8 @@ import 'package:stackwallet/utilities/theme/color_theme.dart'; class LightColors extends StackColorTheme { @override ThemeType get themeType => ThemeType.light; + @override + Brightness get brightness => Brightness.light; @override Color get background => const Color(0xFFF7F7F7); diff --git a/lib/utilities/theme/ocean_breeze_colors.dart b/lib/utilities/theme/ocean_breeze_colors.dart index 51831f2e5..9390c55b5 100644 --- a/lib/utilities/theme/ocean_breeze_colors.dart +++ b/lib/utilities/theme/ocean_breeze_colors.dart @@ -4,6 +4,8 @@ import 'package:stackwallet/utilities/theme/color_theme.dart'; class OceanBreezeColors extends StackColorTheme { @override ThemeType get themeType => ThemeType.oceanBreeze; + @override + Brightness get brightness => Brightness.light; @override Color get background => Colors.transparent; diff --git a/lib/utilities/theme/oled_black_colors.dart b/lib/utilities/theme/oled_black_colors.dart index 025f76f7d..71d4b2361 100644 --- a/lib/utilities/theme/oled_black_colors.dart +++ b/lib/utilities/theme/oled_black_colors.dart @@ -4,6 +4,8 @@ import 'package:stackwallet/utilities/theme/color_theme.dart'; class OledBlackColors extends StackColorTheme { @override ThemeType get themeType => ThemeType.oledBlack; + @override + Brightness get brightness => Brightness.dark; @override Color get background => const Color(0xFF000000); diff --git a/lib/utilities/theme/stack_colors.dart b/lib/utilities/theme/stack_colors.dart index d0ba2cd40..08614b8c5 100644 --- a/lib/utilities/theme/stack_colors.dart +++ b/lib/utilities/theme/stack_colors.dart @@ -4,6 +4,7 @@ import 'package:stackwallet/utilities/theme/color_theme.dart'; class StackColors extends ThemeExtension { final ThemeType themeType; + final Brightness brightness; final Color background; final Color backgroundAppBar; @@ -191,6 +192,7 @@ class StackColors extends ThemeExtension { StackColors({ required this.themeType, + required this.brightness, required this.background, required this.backgroundAppBar, required this.gradientBackground, @@ -340,6 +342,7 @@ class StackColors extends ThemeExtension { factory StackColors.fromStackColorTheme(StackColorTheme colorTheme) { return StackColors( themeType: colorTheme.themeType, + brightness: colorTheme.brightness, background: colorTheme.background, backgroundAppBar: colorTheme.backgroundAppBar, gradientBackground: colorTheme.gradientBackground, @@ -493,6 +496,7 @@ class StackColors extends ThemeExtension { @override ThemeExtension copyWith({ ThemeType? themeType, + Brightness? brightness, Color? background, Color? backgroundAppBar, Gradient? gradientBackground, @@ -640,6 +644,7 @@ class StackColors extends ThemeExtension { }) { return StackColors( themeType: themeType ?? this.themeType, + brightness: brightness ?? this.brightness, background: background ?? this.background, backgroundAppBar: backgroundAppBar ?? this.backgroundAppBar, gradientBackground: gradientBackground ?? this.gradientBackground, @@ -845,6 +850,7 @@ class StackColors extends ThemeExtension { return StackColors( themeType: other.themeType, + brightness: other.brightness, gradientBackground: other.gradientBackground, homeViewButtonBarBoxShadow: other.homeViewButtonBarBoxShadow, standardBoxShadow: other.standardBoxShadow,