From 2984b4917879e54a2c0d73a9e0f8c301971a19e8 Mon Sep 17 00:00:00 2001 From: julian Date: Tue, 9 May 2023 14:46:47 -0600 Subject: [PATCH] use themeId strings --- .../system_brightness_theme_selection_view.dart | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/pages/settings_views/global_settings_view/appearance_settings/system_brightness_theme_selection_view.dart b/lib/pages/settings_views/global_settings_view/appearance_settings/system_brightness_theme_selection_view.dart index b6253fc0d..ad97373fa 100644 --- a/lib/pages/settings_views/global_settings_view/appearance_settings/system_brightness_theme_selection_view.dart +++ b/lib/pages/settings_views/global_settings_view/appearance_settings/system_brightness_theme_selection_view.dart @@ -19,12 +19,13 @@ class SystemBrightnessThemeSelectionView extends ConsumerWidget { void _setTheme({ required BuildContext context, required bool isDark, - required ThemeType type, + required String themeId, required WidgetRef ref, }) { final brightness = MediaQuery.of(context).platformBrightness; if (isDark) { - ref.read(prefsChangeNotifierProvider).systemBrightnessDarkThemeId = type; + ref.read(prefsChangeNotifierProvider).systemBrightnessDarkThemeId = + themeId; if (brightness == Brightness.dark) { throw Exception("aaaaaaaaaaaaaaaa"); // ref.read(themeProvider.notifier).state = @@ -33,7 +34,8 @@ class SystemBrightnessThemeSelectionView extends ConsumerWidget { // ); } } else { - ref.read(prefsChangeNotifierProvider).systemBrightnessLightThemeId = type; + ref.read(prefsChangeNotifierProvider).systemBrightnessLightThemeId = + themeId; if (brightness == Brightness.light) { throw Exception("aaaaaaaaaaaaaaaa"); // ref.read(colorThemeProvider.notifier).state =