mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 07:55:18 +00:00
fix: multiple instance of theme
This commit is contained in:
parent
bf04962e90
commit
4ec04240a5
@ -195,6 +195,15 @@ class SpotubeState extends ConsumerState<Spotube> {
|
||||
};
|
||||
}, []);
|
||||
|
||||
final lightTheme = useMemoized(
|
||||
() => theme(paletteColor ?? accentMaterialColor, Brightness.light),
|
||||
[paletteColor, accentMaterialColor],
|
||||
);
|
||||
final darkTheme = useMemoized(
|
||||
() => theme(paletteColor ?? accentMaterialColor, Brightness.dark),
|
||||
[paletteColor, accentMaterialColor],
|
||||
);
|
||||
|
||||
return MaterialApp.router(
|
||||
supportedLocales: L10n.all,
|
||||
locale: locale.languageCode == "system" ? null : locale,
|
||||
@ -216,8 +225,8 @@ class SpotubeState extends ConsumerState<Spotube> {
|
||||
);
|
||||
},
|
||||
themeMode: themeMode,
|
||||
theme: theme(paletteColor ?? accentMaterialColor, Brightness.light),
|
||||
darkTheme: theme(paletteColor ?? accentMaterialColor, Brightness.dark),
|
||||
theme: lightTheme,
|
||||
darkTheme: darkTheme,
|
||||
shortcuts: {
|
||||
...WidgetsApp.defaultShortcuts.map((key, value) {
|
||||
return MapEntry(
|
||||
|
Loading…
Reference in New Issue
Block a user