use themeId strings

This commit is contained in:
julian 2023-05-09 14:46:47 -06:00
parent 39f06f1654
commit 2984b49178

View file

@ -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 =