feature: Adds schemeVariants to color options (#109)

Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
PartyDonut 2024-11-03 08:59:35 +01:00 committed by GitHub
parent 98130f953e
commit 0b0cd3a557
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 143 additions and 16 deletions

View file

@ -36,6 +36,7 @@ mixin _$ClientSettingsModel {
double get posterSize => throw _privateConstructorUsedError;
bool get pinchPosterZoom => throw _privateConstructorUsedError;
bool get mouseDragSupport => throw _privateConstructorUsedError;
DynamicSchemeVariant get schemeVariant => throw _privateConstructorUsedError;
int? get libraryPageSize => throw _privateConstructorUsedError;
/// Serializes this ClientSettingsModel to a JSON map.
@ -70,6 +71,7 @@ abstract class $ClientSettingsModelCopyWith<$Res> {
double posterSize,
bool pinchPosterZoom,
bool mouseDragSupport,
DynamicSchemeVariant schemeVariant,
int? libraryPageSize});
}
@ -103,6 +105,7 @@ class _$ClientSettingsModelCopyWithImpl<$Res, $Val extends ClientSettingsModel>
Object? posterSize = null,
Object? pinchPosterZoom = null,
Object? mouseDragSupport = null,
Object? schemeVariant = null,
Object? libraryPageSize = freezed,
}) {
return _then(_value.copyWith(
@ -166,6 +169,10 @@ class _$ClientSettingsModelCopyWithImpl<$Res, $Val extends ClientSettingsModel>
? _value.mouseDragSupport
: mouseDragSupport // ignore: cast_nullable_to_non_nullable
as bool,
schemeVariant: null == schemeVariant
? _value.schemeVariant
: schemeVariant // ignore: cast_nullable_to_non_nullable
as DynamicSchemeVariant,
libraryPageSize: freezed == libraryPageSize
? _value.libraryPageSize
: libraryPageSize // ignore: cast_nullable_to_non_nullable
@ -198,6 +205,7 @@ abstract class _$$ClientSettingsModelImplCopyWith<$Res>
double posterSize,
bool pinchPosterZoom,
bool mouseDragSupport,
DynamicSchemeVariant schemeVariant,
int? libraryPageSize});
}
@ -229,6 +237,7 @@ class __$$ClientSettingsModelImplCopyWithImpl<$Res>
Object? posterSize = null,
Object? pinchPosterZoom = null,
Object? mouseDragSupport = null,
Object? schemeVariant = null,
Object? libraryPageSize = freezed,
}) {
return _then(_$ClientSettingsModelImpl(
@ -292,6 +301,10 @@ class __$$ClientSettingsModelImplCopyWithImpl<$Res>
? _value.mouseDragSupport
: mouseDragSupport // ignore: cast_nullable_to_non_nullable
as bool,
schemeVariant: null == schemeVariant
? _value.schemeVariant
: schemeVariant // ignore: cast_nullable_to_non_nullable
as DynamicSchemeVariant,
libraryPageSize: freezed == libraryPageSize
? _value.libraryPageSize
: libraryPageSize // ignore: cast_nullable_to_non_nullable
@ -320,6 +333,7 @@ class _$ClientSettingsModelImpl extends _ClientSettingsModel
this.posterSize = 1.0,
this.pinchPosterZoom = false,
this.mouseDragSupport = false,
this.schemeVariant = DynamicSchemeVariant.tonalSpot,
this.libraryPageSize})
: super._();
@ -369,11 +383,14 @@ class _$ClientSettingsModelImpl extends _ClientSettingsModel
@JsonKey()
final bool mouseDragSupport;
@override
@JsonKey()
final DynamicSchemeVariant schemeVariant;
@override
final int? libraryPageSize;
@override
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
return 'ClientSettingsModel(syncPath: $syncPath, position: $position, size: $size, timeOut: $timeOut, nextUpDateCutoff: $nextUpDateCutoff, themeMode: $themeMode, themeColor: $themeColor, amoledBlack: $amoledBlack, blurPlaceHolders: $blurPlaceHolders, blurUpcomingEpisodes: $blurUpcomingEpisodes, selectedLocale: $selectedLocale, enableMediaKeys: $enableMediaKeys, posterSize: $posterSize, pinchPosterZoom: $pinchPosterZoom, mouseDragSupport: $mouseDragSupport, libraryPageSize: $libraryPageSize)';
return 'ClientSettingsModel(syncPath: $syncPath, position: $position, size: $size, timeOut: $timeOut, nextUpDateCutoff: $nextUpDateCutoff, themeMode: $themeMode, themeColor: $themeColor, amoledBlack: $amoledBlack, blurPlaceHolders: $blurPlaceHolders, blurUpcomingEpisodes: $blurUpcomingEpisodes, selectedLocale: $selectedLocale, enableMediaKeys: $enableMediaKeys, posterSize: $posterSize, pinchPosterZoom: $pinchPosterZoom, mouseDragSupport: $mouseDragSupport, schemeVariant: $schemeVariant, libraryPageSize: $libraryPageSize)';
}
@override
@ -396,6 +413,7 @@ class _$ClientSettingsModelImpl extends _ClientSettingsModel
..add(DiagnosticsProperty('posterSize', posterSize))
..add(DiagnosticsProperty('pinchPosterZoom', pinchPosterZoom))
..add(DiagnosticsProperty('mouseDragSupport', mouseDragSupport))
..add(DiagnosticsProperty('schemeVariant', schemeVariant))
..add(DiagnosticsProperty('libraryPageSize', libraryPageSize));
}
@ -432,6 +450,8 @@ class _$ClientSettingsModelImpl extends _ClientSettingsModel
other.pinchPosterZoom == pinchPosterZoom) &&
(identical(other.mouseDragSupport, mouseDragSupport) ||
other.mouseDragSupport == mouseDragSupport) &&
(identical(other.schemeVariant, schemeVariant) ||
other.schemeVariant == schemeVariant) &&
(identical(other.libraryPageSize, libraryPageSize) ||
other.libraryPageSize == libraryPageSize));
}
@ -455,6 +475,7 @@ class _$ClientSettingsModelImpl extends _ClientSettingsModel
posterSize,
pinchPosterZoom,
mouseDragSupport,
schemeVariant,
libraryPageSize);
/// Create a copy of ClientSettingsModel
@ -491,6 +512,7 @@ abstract class _ClientSettingsModel extends ClientSettingsModel {
final double posterSize,
final bool pinchPosterZoom,
final bool mouseDragSupport,
final DynamicSchemeVariant schemeVariant,
final int? libraryPageSize}) = _$ClientSettingsModelImpl;
_ClientSettingsModel._() : super._();
@ -529,6 +551,8 @@ abstract class _ClientSettingsModel extends ClientSettingsModel {
@override
bool get mouseDragSupport;
@override
DynamicSchemeVariant get schemeVariant;
@override
int? get libraryPageSize;
/// Create a copy of ClientSettingsModel