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

@ -34,6 +34,9 @@ _$ClientSettingsModelImpl _$$ClientSettingsModelImplFromJson(
posterSize: (json['posterSize'] as num?)?.toDouble() ?? 1.0,
pinchPosterZoom: json['pinchPosterZoom'] as bool? ?? false,
mouseDragSupport: json['mouseDragSupport'] as bool? ?? false,
schemeVariant: $enumDecodeNullable(
_$DynamicSchemeVariantEnumMap, json['schemeVariant']) ??
DynamicSchemeVariant.tonalSpot,
libraryPageSize: (json['libraryPageSize'] as num?)?.toInt(),
);
@ -55,6 +58,7 @@ Map<String, dynamic> _$$ClientSettingsModelImplToJson(
'posterSize': instance.posterSize,
'pinchPosterZoom': instance.pinchPosterZoom,
'mouseDragSupport': instance.mouseDragSupport,
'schemeVariant': _$DynamicSchemeVariantEnumMap[instance.schemeVariant]!,
'libraryPageSize': instance.libraryPageSize,
};
@ -81,3 +85,15 @@ const _$ColorThemesEnumMap = {
ColorThemes.deepPurple: 'deepPurple',
ColorThemes.blueGrey: 'blueGrey',
};
const _$DynamicSchemeVariantEnumMap = {
DynamicSchemeVariant.tonalSpot: 'tonalSpot',
DynamicSchemeVariant.fidelity: 'fidelity',
DynamicSchemeVariant.monochrome: 'monochrome',
DynamicSchemeVariant.neutral: 'neutral',
DynamicSchemeVariant.vibrant: 'vibrant',
DynamicSchemeVariant.expressive: 'expressive',
DynamicSchemeVariant.content: 'content',
DynamicSchemeVariant.rainbow: 'rainbow',
DynamicSchemeVariant.fruitSalad: 'fruitSalad',
};