mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-07 21:48:14 -08: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?> {
|
||||
|
|
|
|||
|
|
@ -294,9 +294,8 @@ class __$$ClientSettingsModelImplCopyWithImpl<$Res>
|
|||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$ClientSettingsModelImpl
|
||||
with DiagnosticableTreeMixin
|
||||
implements _ClientSettingsModel {
|
||||
class _$ClientSettingsModelImpl extends _ClientSettingsModel
|
||||
with DiagnosticableTreeMixin {
|
||||
_$ClientSettingsModelImpl(
|
||||
{this.syncPath,
|
||||
this.position = const Vector2(x: 0, y: 0),
|
||||
|
|
@ -313,7 +312,8 @@ class _$ClientSettingsModelImpl
|
|||
this.posterSize = 1.0,
|
||||
this.pinchPosterZoom = false,
|
||||
this.mouseDragSupport = false,
|
||||
this.libraryPageSize});
|
||||
this.libraryPageSize})
|
||||
: super._();
|
||||
|
||||
factory _$ClientSettingsModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$ClientSettingsModelImplFromJson(json);
|
||||
|
|
@ -464,7 +464,7 @@ class _$ClientSettingsModelImpl
|
|||
}
|
||||
}
|
||||
|
||||
abstract class _ClientSettingsModel implements ClientSettingsModel {
|
||||
abstract class _ClientSettingsModel extends ClientSettingsModel {
|
||||
factory _ClientSettingsModel(
|
||||
{final String? syncPath,
|
||||
final Vector2 position,
|
||||
|
|
@ -482,6 +482,7 @@ abstract class _ClientSettingsModel implements ClientSettingsModel {
|
|||
final bool pinchPosterZoom,
|
||||
final bool mouseDragSupport,
|
||||
final int? libraryPageSize}) = _$ClientSettingsModelImpl;
|
||||
_ClientSettingsModel._() : super._();
|
||||
|
||||
factory _ClientSettingsModel.fromJson(Map<String, dynamic> json) =
|
||||
_$ClientSettingsModelImpl.fromJson;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue