mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-06-21 04:44:18 -04:00
xfer
This commit is contained in:
parent
08dab73757
commit
c08878b35a
39 changed files with 771 additions and 218 deletions
|
@ -24,7 +24,8 @@ class ThemeService {
|
|||
String? themeName = prefs.getString('previousThemeName');
|
||||
if (themeName == null) {
|
||||
final isPlatformDark =
|
||||
WidgetsBinding.instance.window.platformBrightness == Brightness.dark;
|
||||
WidgetsBinding.instance.platformDispatcher.platformBrightness ==
|
||||
Brightness.dark;
|
||||
themeName = isPlatformDark ? 'light' : 'dark';
|
||||
}
|
||||
return themeName;
|
||||
|
@ -34,7 +35,8 @@ class ThemeService {
|
|||
String? themeName = prefs.getString('theme');
|
||||
if (themeName == null) {
|
||||
final isPlatformDark =
|
||||
WidgetsBinding.instance.window.platformBrightness == Brightness.dark;
|
||||
WidgetsBinding.instance.platformDispatcher.platformBrightness ==
|
||||
Brightness.dark;
|
||||
themeName = isPlatformDark ? 'dark' : 'light';
|
||||
}
|
||||
return allThemes[themeName];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue