mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-09 07:28:14 -07:00
[Bugfix] Fixed statusbar color lightMode
This commit is contained in:
parent
e70858eb64
commit
986893d8ac
4 changed files with 35 additions and 5 deletions
|
|
@ -13,6 +13,7 @@ part 'client_settings_model.g.dart';
|
|||
|
||||
@freezed
|
||||
class ClientSettingsModel with _$ClientSettingsModel {
|
||||
const ClientSettingsModel._();
|
||||
factory ClientSettingsModel({
|
||||
String? syncPath,
|
||||
@Default(Vector2(x: 0, y: 0)) Vector2 position,
|
||||
|
|
@ -33,6 +34,14 @@ class ClientSettingsModel with _$ClientSettingsModel {
|
|||
}) = _ClientSettingsModel;
|
||||
|
||||
factory ClientSettingsModel.fromJson(Map<String, dynamic> json) => _$ClientSettingsModelFromJson(json);
|
||||
|
||||
Brightness statusBarBrightness(BuildContext context) {
|
||||
return switch (themeMode) {
|
||||
ThemeMode.dark => Brightness.light,
|
||||
ThemeMode.light => Brightness.dark,
|
||||
_ => MediaQuery.of(context).platformBrightness == Brightness.dark ? Brightness.light : Brightness.dark,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
class LocaleConvert implements JsonConverter<Locale?, String?> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue