2024-05-08 05:03:49 -04:00
|
|
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
|
|
|
|
|
|
part of 'app_settings.dart';
|
|
|
|
|
|
|
|
|
|
// **************************************************************************
|
|
|
|
|
// JsonSerializableGenerator
|
|
|
|
|
// **************************************************************************
|
|
|
|
|
|
|
|
|
|
_$AppSettingsImpl _$$AppSettingsImplFromJson(Map<String, dynamic> json) =>
|
|
|
|
|
_$AppSettingsImpl(
|
2024-08-20 11:39:26 -04:00
|
|
|
themeSettings: json['themeSettings'] == null
|
|
|
|
|
? const ThemeSettings()
|
|
|
|
|
: ThemeSettings.fromJson(
|
|
|
|
|
json['themeSettings'] as Map<String, dynamic>),
|
2024-05-17 11:04:20 -04:00
|
|
|
playerSettings: json['playerSettings'] == null
|
|
|
|
|
? const PlayerSettings()
|
|
|
|
|
: PlayerSettings.fromJson(
|
|
|
|
|
json['playerSettings'] as Map<String, dynamic>),
|
2024-08-20 08:36:39 -04:00
|
|
|
downloadSettings: json['downloadSettings'] == null
|
|
|
|
|
? const DownloadSettings()
|
|
|
|
|
: DownloadSettings.fromJson(
|
|
|
|
|
json['downloadSettings'] as Map<String, dynamic>),
|
2024-05-08 05:03:49 -04:00
|
|
|
);
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> _$$AppSettingsImplToJson(_$AppSettingsImpl instance) =>
|
|
|
|
|
<String, dynamic>{
|
2024-08-20 11:39:26 -04:00
|
|
|
'themeSettings': instance.themeSettings,
|
2024-05-17 11:04:20 -04:00
|
|
|
'playerSettings': instance.playerSettings,
|
2024-08-20 08:36:39 -04:00
|
|
|
'downloadSettings': instance.downloadSettings,
|
2024-05-17 11:04:20 -04:00
|
|
|
};
|
|
|
|
|
|
2024-08-20 11:39:26 -04:00
|
|
|
_$ThemeSettingsImpl _$$ThemeSettingsImplFromJson(Map<String, dynamic> json) =>
|
|
|
|
|
_$ThemeSettingsImpl(
|
|
|
|
|
isDarkMode: json['isDarkMode'] as bool? ?? true,
|
|
|
|
|
useMaterialThemeOnItemPage:
|
|
|
|
|
json['useMaterialThemeOnItemPage'] as bool? ?? true,
|
2024-08-20 11:52:35 -04:00
|
|
|
useCurrentPlayerThemeThroughoutApp:
|
|
|
|
|
json['useCurrentPlayerThemeThroughoutApp'] as bool? ?? true,
|
2024-08-20 11:39:26 -04:00
|
|
|
);
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> _$$ThemeSettingsImplToJson(_$ThemeSettingsImpl instance) =>
|
|
|
|
|
<String, dynamic>{
|
|
|
|
|
'isDarkMode': instance.isDarkMode,
|
|
|
|
|
'useMaterialThemeOnItemPage': instance.useMaterialThemeOnItemPage,
|
2024-08-20 11:52:35 -04:00
|
|
|
'useCurrentPlayerThemeThroughoutApp':
|
|
|
|
|
instance.useCurrentPlayerThemeThroughoutApp,
|
2024-08-20 11:39:26 -04:00
|
|
|
};
|
|
|
|
|
|
2024-05-17 11:04:20 -04:00
|
|
|
_$PlayerSettingsImpl _$$PlayerSettingsImplFromJson(Map<String, dynamic> json) =>
|
|
|
|
|
_$PlayerSettingsImpl(
|
|
|
|
|
miniPlayerSettings: json['miniPlayerSettings'] == null
|
|
|
|
|
? const MinimizedPlayerSettings()
|
|
|
|
|
: MinimizedPlayerSettings.fromJson(
|
|
|
|
|
json['miniPlayerSettings'] as Map<String, dynamic>),
|
2024-05-19 08:53:21 -04:00
|
|
|
expandedPlayerSettings: json['expandedPlayerSettings'] == null
|
|
|
|
|
? const ExpandedPlayerSettings()
|
|
|
|
|
: ExpandedPlayerSettings.fromJson(
|
|
|
|
|
json['expandedPlayerSettings'] as Map<String, dynamic>),
|
2024-05-21 10:50:02 -04:00
|
|
|
preferredDefaultVolume:
|
|
|
|
|
(json['preferredDefaultVolume'] as num?)?.toDouble() ?? 1,
|
|
|
|
|
preferredDefaultSpeed:
|
|
|
|
|
(json['preferredDefaultSpeed'] as num?)?.toDouble() ?? 1,
|
|
|
|
|
speedOptions: (json['speedOptions'] as List<dynamic>?)
|
|
|
|
|
?.map((e) => (e as num).toDouble())
|
|
|
|
|
.toList() ??
|
2024-05-22 02:13:01 -04:00
|
|
|
const [0.75, 1, 1.25, 1.5, 1.75, 2],
|
2024-06-06 15:35:30 -04:00
|
|
|
sleepTimerSettings: json['sleepTimerSettings'] == null
|
|
|
|
|
? const SleepTimerSettings()
|
|
|
|
|
: SleepTimerSettings.fromJson(
|
|
|
|
|
json['sleepTimerSettings'] as Map<String, dynamic>),
|
2024-06-15 23:43:08 -04:00
|
|
|
playbackReportInterval: json['playbackReportInterval'] == null
|
|
|
|
|
? const Duration(seconds: 10)
|
|
|
|
|
: Duration(
|
|
|
|
|
microseconds: (json['playbackReportInterval'] as num).toInt()),
|
2024-05-17 11:04:20 -04:00
|
|
|
);
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> _$$PlayerSettingsImplToJson(
|
|
|
|
|
_$PlayerSettingsImpl instance) =>
|
|
|
|
|
<String, dynamic>{
|
|
|
|
|
'miniPlayerSettings': instance.miniPlayerSettings,
|
2024-05-19 08:53:21 -04:00
|
|
|
'expandedPlayerSettings': instance.expandedPlayerSettings,
|
2024-05-21 10:50:02 -04:00
|
|
|
'preferredDefaultVolume': instance.preferredDefaultVolume,
|
|
|
|
|
'preferredDefaultSpeed': instance.preferredDefaultSpeed,
|
|
|
|
|
'speedOptions': instance.speedOptions,
|
2024-06-06 15:35:30 -04:00
|
|
|
'sleepTimerSettings': instance.sleepTimerSettings,
|
2024-06-15 23:43:08 -04:00
|
|
|
'playbackReportInterval': instance.playbackReportInterval.inMicroseconds,
|
2024-05-17 11:04:20 -04:00
|
|
|
};
|
|
|
|
|
|
2024-05-19 08:53:21 -04:00
|
|
|
_$ExpandedPlayerSettingsImpl _$$ExpandedPlayerSettingsImplFromJson(
|
2024-05-17 11:04:20 -04:00
|
|
|
Map<String, dynamic> json) =>
|
2024-05-19 08:53:21 -04:00
|
|
|
_$ExpandedPlayerSettingsImpl(
|
|
|
|
|
showTotalProgress: json['showTotalProgress'] as bool? ?? false,
|
|
|
|
|
showChapterProgress: json['showChapterProgress'] as bool? ?? true,
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> _$$ExpandedPlayerSettingsImplToJson(
|
|
|
|
|
_$ExpandedPlayerSettingsImpl instance) =>
|
|
|
|
|
<String, dynamic>{
|
|
|
|
|
'showTotalProgress': instance.showTotalProgress,
|
|
|
|
|
'showChapterProgress': instance.showChapterProgress,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
_$MinimizedPlayerSettingsImpl _$$MinimizedPlayerSettingsImplFromJson(
|
|
|
|
|
Map<String, dynamic> json) =>
|
|
|
|
|
_$MinimizedPlayerSettingsImpl(
|
2024-05-17 11:04:20 -04:00
|
|
|
useChapterInfo: json['useChapterInfo'] as bool? ?? false,
|
|
|
|
|
);
|
|
|
|
|
|
2024-05-19 08:53:21 -04:00
|
|
|
Map<String, dynamic> _$$MinimizedPlayerSettingsImplToJson(
|
|
|
|
|
_$MinimizedPlayerSettingsImpl instance) =>
|
2024-05-17 11:04:20 -04:00
|
|
|
<String, dynamic>{
|
|
|
|
|
'useChapterInfo': instance.useChapterInfo,
|
2024-05-08 05:03:49 -04:00
|
|
|
};
|
2024-06-06 15:35:30 -04:00
|
|
|
|
|
|
|
|
_$SleepTimerSettingsImpl _$$SleepTimerSettingsImplFromJson(
|
|
|
|
|
Map<String, dynamic> json) =>
|
|
|
|
|
_$SleepTimerSettingsImpl(
|
|
|
|
|
defaultDuration: json['defaultDuration'] == null
|
|
|
|
|
? const Duration(minutes: 15)
|
|
|
|
|
: Duration(microseconds: (json['defaultDuration'] as num).toInt()),
|
|
|
|
|
shakeSenseMode: $enumDecodeNullable(
|
|
|
|
|
_$SleepTimerShakeSenseModeEnumMap, json['shakeSenseMode']) ??
|
|
|
|
|
SleepTimerShakeSenseMode.always,
|
|
|
|
|
shakeSenseDuration: json['shakeSenseDuration'] == null
|
|
|
|
|
? const Duration(seconds: 30)
|
|
|
|
|
: Duration(microseconds: (json['shakeSenseDuration'] as num).toInt()),
|
|
|
|
|
vibrateWhenReset: json['vibrateWhenReset'] as bool? ?? true,
|
|
|
|
|
beepWhenReset: json['beepWhenReset'] as bool? ?? false,
|
|
|
|
|
fadeOutAudio: json['fadeOutAudio'] as bool? ?? false,
|
|
|
|
|
shakeDetectThreshold:
|
|
|
|
|
(json['shakeDetectThreshold'] as num?)?.toDouble() ?? 0.5,
|
|
|
|
|
autoRewindWhenStopped: json['autoRewindWhenStopped'] as bool? ?? false,
|
|
|
|
|
autoRewindDurations:
|
|
|
|
|
(json['autoRewindDurations'] as Map<String, dynamic>?)?.map(
|
|
|
|
|
(k, e) => MapEntry(
|
|
|
|
|
int.parse(k), Duration(microseconds: (e as num).toInt())),
|
|
|
|
|
) ??
|
|
|
|
|
const {
|
|
|
|
|
5: Duration(seconds: 10),
|
|
|
|
|
15: Duration(seconds: 30),
|
|
|
|
|
45: Duration(seconds: 45),
|
|
|
|
|
60: Duration(minutes: 1),
|
|
|
|
|
120: Duration(minutes: 2)
|
|
|
|
|
},
|
|
|
|
|
autoTurnOnTimer: json['autoTurnOnTimer'] as bool? ?? false,
|
|
|
|
|
alwaysAutoTurnOnTimer: json['alwaysAutoTurnOnTimer'] as bool? ?? true,
|
|
|
|
|
autoTurnOnTime: json['autoTurnOnTime'] == null
|
|
|
|
|
? const Duration(hours: 22, minutes: 0)
|
|
|
|
|
: Duration(microseconds: (json['autoTurnOnTime'] as num).toInt()),
|
|
|
|
|
autoTurnOffTime: json['autoTurnOffTime'] == null
|
|
|
|
|
? const Duration(hours: 6, minutes: 0)
|
|
|
|
|
: Duration(microseconds: (json['autoTurnOffTime'] as num).toInt()),
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> _$$SleepTimerSettingsImplToJson(
|
|
|
|
|
_$SleepTimerSettingsImpl instance) =>
|
|
|
|
|
<String, dynamic>{
|
|
|
|
|
'defaultDuration': instance.defaultDuration.inMicroseconds,
|
|
|
|
|
'shakeSenseMode':
|
|
|
|
|
_$SleepTimerShakeSenseModeEnumMap[instance.shakeSenseMode]!,
|
|
|
|
|
'shakeSenseDuration': instance.shakeSenseDuration.inMicroseconds,
|
|
|
|
|
'vibrateWhenReset': instance.vibrateWhenReset,
|
|
|
|
|
'beepWhenReset': instance.beepWhenReset,
|
|
|
|
|
'fadeOutAudio': instance.fadeOutAudio,
|
|
|
|
|
'shakeDetectThreshold': instance.shakeDetectThreshold,
|
|
|
|
|
'autoRewindWhenStopped': instance.autoRewindWhenStopped,
|
|
|
|
|
'autoRewindDurations': instance.autoRewindDurations
|
|
|
|
|
.map((k, e) => MapEntry(k.toString(), e.inMicroseconds)),
|
|
|
|
|
'autoTurnOnTimer': instance.autoTurnOnTimer,
|
|
|
|
|
'alwaysAutoTurnOnTimer': instance.alwaysAutoTurnOnTimer,
|
|
|
|
|
'autoTurnOnTime': instance.autoTurnOnTime.inMicroseconds,
|
|
|
|
|
'autoTurnOffTime': instance.autoTurnOffTime.inMicroseconds,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const _$SleepTimerShakeSenseModeEnumMap = {
|
|
|
|
|
SleepTimerShakeSenseMode.never: 'never',
|
|
|
|
|
SleepTimerShakeSenseMode.always: 'always',
|
|
|
|
|
SleepTimerShakeSenseMode.nearEnds: 'nearEnds',
|
|
|
|
|
};
|
2024-08-20 08:36:39 -04:00
|
|
|
|
|
|
|
|
_$DownloadSettingsImpl _$$DownloadSettingsImplFromJson(
|
|
|
|
|
Map<String, dynamic> json) =>
|
|
|
|
|
_$DownloadSettingsImpl(
|
|
|
|
|
requiresWiFi: json['requiresWiFi'] as bool? ?? true,
|
|
|
|
|
retries: (json['retries'] as num?)?.toInt() ?? 3,
|
|
|
|
|
allowPause: json['allowPause'] as bool? ?? true,
|
|
|
|
|
maxConcurrent: (json['maxConcurrent'] as num?)?.toInt() ?? 3,
|
|
|
|
|
maxConcurrentByHost: (json['maxConcurrentByHost'] as num?)?.toInt() ?? 3,
|
|
|
|
|
maxConcurrentByGroup:
|
|
|
|
|
(json['maxConcurrentByGroup'] as num?)?.toInt() ?? 3,
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> _$$DownloadSettingsImplToJson(
|
|
|
|
|
_$DownloadSettingsImpl instance) =>
|
|
|
|
|
<String, dynamic>{
|
|
|
|
|
'requiresWiFi': instance.requiresWiFi,
|
|
|
|
|
'retries': instance.retries,
|
|
|
|
|
'allowPause': instance.allowPause,
|
|
|
|
|
'maxConcurrent': instance.maxConcurrent,
|
|
|
|
|
'maxConcurrentByHost': instance.maxConcurrentByHost,
|
|
|
|
|
'maxConcurrentByGroup': instance.maxConcurrentByGroup,
|
|
|
|
|
};
|