mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 16:05: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(
|
return MaterialApp.router(
|
||||||
supportedLocales: L10n.all,
|
supportedLocales: L10n.all,
|
||||||
locale: locale.languageCode == "system" ? null : locale,
|
locale: locale.languageCode == "system" ? null : locale,
|
||||||
@ -216,8 +225,8 @@ class SpotubeState extends ConsumerState<Spotube> {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
themeMode: themeMode,
|
themeMode: themeMode,
|
||||||
theme: theme(paletteColor ?? accentMaterialColor, Brightness.light),
|
theme: lightTheme,
|
||||||
darkTheme: theme(paletteColor ?? accentMaterialColor, Brightness.dark),
|
darkTheme: darkTheme,
|
||||||
shortcuts: {
|
shortcuts: {
|
||||||
...WidgetsApp.defaultShortcuts.map((key, value) {
|
...WidgetsApp.defaultShortcuts.map((key, value) {
|
||||||
return MapEntry(
|
return MapEntry(
|
||||||
|
Loading…
Reference in New Issue
Block a user