mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2026-07-08 10:21:44 +00:00
feat: integrate dynamic color support and enhance theme settings management
This commit is contained in:
parent
dc263267be
commit
0437ca110c
11 changed files with 225 additions and 30 deletions
|
|
@ -47,6 +47,14 @@ Map<String, dynamic> _$$AppSettingsImplToJson(_$AppSettingsImpl instance) =>
|
|||
_$ThemeSettingsImpl _$$ThemeSettingsImplFromJson(Map<String, dynamic> json) =>
|
||||
_$ThemeSettingsImpl(
|
||||
isDarkMode: json['isDarkMode'] as bool? ?? true,
|
||||
themeType: $enumDecodeNullable(_$ThemeTypeEnumMap, json['themeType']) ??
|
||||
ThemeType.system,
|
||||
highContrast: json['highContrast'] as bool? ?? false,
|
||||
useMaterialThemeFromSystem:
|
||||
json['useMaterialThemeFromSystem'] as bool? ?? true,
|
||||
customThemeColor: json['customThemeColor'] as String? ?? '#FF311B92',
|
||||
useMaterialThemeOfPlayingItem:
|
||||
json['useMaterialThemeOfPlayingItem'] as bool? ?? true,
|
||||
useMaterialThemeOnItemPage:
|
||||
json['useMaterialThemeOnItemPage'] as bool? ?? true,
|
||||
useCurrentPlayerThemeThroughoutApp:
|
||||
|
|
@ -56,11 +64,22 @@ _$ThemeSettingsImpl _$$ThemeSettingsImplFromJson(Map<String, dynamic> json) =>
|
|||
Map<String, dynamic> _$$ThemeSettingsImplToJson(_$ThemeSettingsImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'isDarkMode': instance.isDarkMode,
|
||||
'themeType': _$ThemeTypeEnumMap[instance.themeType]!,
|
||||
'highContrast': instance.highContrast,
|
||||
'useMaterialThemeFromSystem': instance.useMaterialThemeFromSystem,
|
||||
'customThemeColor': instance.customThemeColor,
|
||||
'useMaterialThemeOfPlayingItem': instance.useMaterialThemeOfPlayingItem,
|
||||
'useMaterialThemeOnItemPage': instance.useMaterialThemeOnItemPage,
|
||||
'useCurrentPlayerThemeThroughoutApp':
|
||||
instance.useCurrentPlayerThemeThroughoutApp,
|
||||
};
|
||||
|
||||
const _$ThemeTypeEnumMap = {
|
||||
ThemeType.light: 'light',
|
||||
ThemeType.dark: 'dark',
|
||||
ThemeType.system: 'system',
|
||||
};
|
||||
|
||||
_$PlayerSettingsImpl _$$PlayerSettingsImplFromJson(Map<String, dynamic> json) =>
|
||||
_$PlayerSettingsImpl(
|
||||
miniPlayerSettings: json['miniPlayerSettings'] == null
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue