feat: Add useCurrentPlayerThemeThroughoutApp setting to ThemeSettings

This commit is contained in:
Dr-Blank 2024-08-20 11:52:35 -04:00
parent 74e0d77cf9
commit 3e405b795d
No known key found for this signature in database
GPG key ID: 7452CC63F210A266
4 changed files with 54 additions and 19 deletions

View file

@ -55,7 +55,7 @@ void main() async {
// run the app
runApp(
const ProviderScope(
child: MyApp(),
child: _EagerInitialization(child: MyApp()),
),
);
}
@ -76,16 +76,14 @@ class MyApp extends ConsumerWidget {
routerConfig.goNamed(Routes.onboarding.name);
}
return _EagerInitialization(
child: MaterialApp.router(
// debugShowCheckedModeBanner: false,
theme: lightTheme,
darkTheme: darkTheme,
themeMode: ref.watch(appSettingsProvider).themeSettings.isDarkMode
? ThemeMode.dark
: ThemeMode.light,
routerConfig: routerConfig,
),
return MaterialApp.router(
// debugShowCheckedModeBanner: false,
theme: lightTheme,
darkTheme: darkTheme,
themeMode: ref.watch(appSettingsProvider).themeSettings.isDarkMode
? ThemeMode.dark
: ThemeMode.light,
routerConfig: routerConfig,
);
}
}