mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-07-28 00:45:17 -04:00
lint work
This commit is contained in:
parent
9e4008214d
commit
6e8725f569
43 changed files with 257 additions and 332 deletions
|
@ -21,7 +21,7 @@ class ThemeService {
|
|||
};
|
||||
|
||||
String get previousThemeName {
|
||||
String? themeName = prefs.getString('previousThemeName');
|
||||
var themeName = prefs.getString('previousThemeName');
|
||||
if (themeName == null) {
|
||||
final isPlatformDark =
|
||||
WidgetsBinding.instance.platformDispatcher.platformBrightness ==
|
||||
|
@ -31,8 +31,8 @@ class ThemeService {
|
|||
return themeName;
|
||||
}
|
||||
|
||||
get initial {
|
||||
String? themeName = prefs.getString('theme');
|
||||
ThemeData? get initial {
|
||||
var themeName = prefs.getString('theme');
|
||||
if (themeName == null) {
|
||||
final isPlatformDark =
|
||||
WidgetsBinding.instance.platformDispatcher.platformBrightness ==
|
||||
|
@ -43,14 +43,12 @@ class ThemeService {
|
|||
}
|
||||
|
||||
save(String newThemeName) {
|
||||
var currentThemeName = prefs.getString('theme');
|
||||
final currentThemeName = prefs.getString('theme');
|
||||
if (currentThemeName != null) {
|
||||
prefs.setString('previousThemeName', currentThemeName);
|
||||
}
|
||||
prefs.setString('theme', newThemeName);
|
||||
}
|
||||
|
||||
ThemeData getByName(String name) {
|
||||
return allThemes[name]!;
|
||||
}
|
||||
ThemeData getByName(String name) => allThemes[name]!;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue