mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2026-01-17 15:49:32 +00:00
chore: update flutter and dependencies
This commit is contained in:
parent
06694f5f0b
commit
a520136e01
80 changed files with 7701 additions and 9141 deletions
|
|
@ -6,39 +6,41 @@ part of 'app_settings.dart';
|
|||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$AppSettingsImpl _$$AppSettingsImplFromJson(Map<String, dynamic> json) =>
|
||||
_$AppSettingsImpl(
|
||||
themeSettings: json['themeSettings'] == null
|
||||
? const ThemeSettings()
|
||||
: ThemeSettings.fromJson(
|
||||
json['themeSettings'] as Map<String, dynamic>),
|
||||
playerSettings: json['playerSettings'] == null
|
||||
? const PlayerSettings()
|
||||
: PlayerSettings.fromJson(
|
||||
json['playerSettings'] as Map<String, dynamic>),
|
||||
sleepTimerSettings: json['sleepTimerSettings'] == null
|
||||
? const SleepTimerSettings()
|
||||
: SleepTimerSettings.fromJson(
|
||||
json['sleepTimerSettings'] as Map<String, dynamic>),
|
||||
downloadSettings: json['downloadSettings'] == null
|
||||
? const DownloadSettings()
|
||||
: DownloadSettings.fromJson(
|
||||
json['downloadSettings'] as Map<String, dynamic>),
|
||||
notificationSettings: json['notificationSettings'] == null
|
||||
? const NotificationSettings()
|
||||
: NotificationSettings.fromJson(
|
||||
json['notificationSettings'] as Map<String, dynamic>),
|
||||
shakeDetectionSettings: json['shakeDetectionSettings'] == null
|
||||
? const ShakeDetectionSettings()
|
||||
: ShakeDetectionSettings.fromJson(
|
||||
json['shakeDetectionSettings'] as Map<String, dynamic>),
|
||||
homePageSettings: json['homePageSettings'] == null
|
||||
? const HomePageSettings()
|
||||
: HomePageSettings.fromJson(
|
||||
json['homePageSettings'] as Map<String, dynamic>),
|
||||
);
|
||||
_AppSettings _$AppSettingsFromJson(Map<String, dynamic> json) => _AppSettings(
|
||||
themeSettings: json['themeSettings'] == null
|
||||
? const ThemeSettings()
|
||||
: ThemeSettings.fromJson(json['themeSettings'] as Map<String, dynamic>),
|
||||
playerSettings: json['playerSettings'] == null
|
||||
? const PlayerSettings()
|
||||
: PlayerSettings.fromJson(json['playerSettings'] as Map<String, dynamic>),
|
||||
sleepTimerSettings: json['sleepTimerSettings'] == null
|
||||
? const SleepTimerSettings()
|
||||
: SleepTimerSettings.fromJson(
|
||||
json['sleepTimerSettings'] as Map<String, dynamic>,
|
||||
),
|
||||
downloadSettings: json['downloadSettings'] == null
|
||||
? const DownloadSettings()
|
||||
: DownloadSettings.fromJson(
|
||||
json['downloadSettings'] as Map<String, dynamic>,
|
||||
),
|
||||
notificationSettings: json['notificationSettings'] == null
|
||||
? const NotificationSettings()
|
||||
: NotificationSettings.fromJson(
|
||||
json['notificationSettings'] as Map<String, dynamic>,
|
||||
),
|
||||
shakeDetectionSettings: json['shakeDetectionSettings'] == null
|
||||
? const ShakeDetectionSettings()
|
||||
: ShakeDetectionSettings.fromJson(
|
||||
json['shakeDetectionSettings'] as Map<String, dynamic>,
|
||||
),
|
||||
homePageSettings: json['homePageSettings'] == null
|
||||
? const HomePageSettings()
|
||||
: HomePageSettings.fromJson(
|
||||
json['homePageSettings'] as Map<String, dynamic>,
|
||||
),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$AppSettingsImplToJson(_$AppSettingsImpl instance) =>
|
||||
Map<String, dynamic> _$AppSettingsToJson(_AppSettings instance) =>
|
||||
<String, dynamic>{
|
||||
'themeSettings': instance.themeSettings,
|
||||
'playerSettings': instance.playerSettings,
|
||||
|
|
@ -49,9 +51,10 @@ Map<String, dynamic> _$$AppSettingsImplToJson(_$AppSettingsImpl instance) =>
|
|||
'homePageSettings': instance.homePageSettings,
|
||||
};
|
||||
|
||||
_$ThemeSettingsImpl _$$ThemeSettingsImplFromJson(Map<String, dynamic> json) =>
|
||||
_$ThemeSettingsImpl(
|
||||
themeMode: $enumDecodeNullable(_$ThemeModeEnumMap, json['themeMode']) ??
|
||||
_ThemeSettings _$ThemeSettingsFromJson(Map<String, dynamic> json) =>
|
||||
_ThemeSettings(
|
||||
themeMode:
|
||||
$enumDecodeNullable(_$ThemeModeEnumMap, json['themeMode']) ??
|
||||
ThemeMode.system,
|
||||
highContrast: json['highContrast'] as bool? ?? false,
|
||||
useMaterialThemeFromSystem:
|
||||
|
|
@ -63,7 +66,7 @@ _$ThemeSettingsImpl _$$ThemeSettingsImplFromJson(Map<String, dynamic> json) =>
|
|||
json['useCurrentPlayerThemeThroughoutApp'] as bool? ?? true,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ThemeSettingsImplToJson(_$ThemeSettingsImpl instance) =>
|
||||
Map<String, dynamic> _$ThemeSettingsToJson(_ThemeSettings instance) =>
|
||||
<String, dynamic>{
|
||||
'themeMode': _$ThemeModeEnumMap[instance.themeMode]!,
|
||||
'highContrast': instance.highContrast,
|
||||
|
|
@ -80,96 +83,97 @@ const _$ThemeModeEnumMap = {
|
|||
ThemeMode.dark: 'dark',
|
||||
};
|
||||
|
||||
_$PlayerSettingsImpl _$$PlayerSettingsImplFromJson(Map<String, dynamic> json) =>
|
||||
_$PlayerSettingsImpl(
|
||||
miniPlayerSettings: json['miniPlayerSettings'] == null
|
||||
? const MinimizedPlayerSettings()
|
||||
: MinimizedPlayerSettings.fromJson(
|
||||
json['miniPlayerSettings'] as Map<String, dynamic>),
|
||||
expandedPlayerSettings: json['expandedPlayerSettings'] == null
|
||||
? const ExpandedPlayerSettings()
|
||||
: ExpandedPlayerSettings.fromJson(
|
||||
json['expandedPlayerSettings'] as Map<String, dynamic>),
|
||||
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() ??
|
||||
const [1, 1.25, 1.5, 1.75, 2],
|
||||
speedIncrement: (json['speedIncrement'] as num?)?.toDouble() ?? 0.05,
|
||||
minSpeed: (json['minSpeed'] as num?)?.toDouble() ?? 0.1,
|
||||
maxSpeed: (json['maxSpeed'] as num?)?.toDouble() ?? 4,
|
||||
minimumPositionForReporting: json['minimumPositionForReporting'] == null
|
||||
? const Duration(seconds: 10)
|
||||
: Duration(
|
||||
microseconds:
|
||||
(json['minimumPositionForReporting'] as num).toInt()),
|
||||
playbackReportInterval: json['playbackReportInterval'] == null
|
||||
? const Duration(seconds: 10)
|
||||
: Duration(
|
||||
microseconds: (json['playbackReportInterval'] as num).toInt()),
|
||||
markCompleteWhenTimeLeft: json['markCompleteWhenTimeLeft'] == null
|
||||
? const Duration(seconds: 15)
|
||||
: Duration(
|
||||
microseconds: (json['markCompleteWhenTimeLeft'] as num).toInt()),
|
||||
configurePlayerForEveryBook:
|
||||
json['configurePlayerForEveryBook'] as bool? ?? true,
|
||||
);
|
||||
_PlayerSettings _$PlayerSettingsFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _PlayerSettings(
|
||||
miniPlayerSettings: json['miniPlayerSettings'] == null
|
||||
? const MinimizedPlayerSettings()
|
||||
: MinimizedPlayerSettings.fromJson(
|
||||
json['miniPlayerSettings'] as Map<String, dynamic>,
|
||||
),
|
||||
expandedPlayerSettings: json['expandedPlayerSettings'] == null
|
||||
? const ExpandedPlayerSettings()
|
||||
: ExpandedPlayerSettings.fromJson(
|
||||
json['expandedPlayerSettings'] as Map<String, dynamic>,
|
||||
),
|
||||
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() ??
|
||||
const [1, 1.25, 1.5, 1.75, 2],
|
||||
speedIncrement: (json['speedIncrement'] as num?)?.toDouble() ?? 0.05,
|
||||
minSpeed: (json['minSpeed'] as num?)?.toDouble() ?? 0.1,
|
||||
maxSpeed: (json['maxSpeed'] as num?)?.toDouble() ?? 4,
|
||||
minimumPositionForReporting: json['minimumPositionForReporting'] == null
|
||||
? const Duration(seconds: 10)
|
||||
: Duration(
|
||||
microseconds: (json['minimumPositionForReporting'] as num).toInt(),
|
||||
),
|
||||
playbackReportInterval: json['playbackReportInterval'] == null
|
||||
? const Duration(seconds: 10)
|
||||
: Duration(microseconds: (json['playbackReportInterval'] as num).toInt()),
|
||||
markCompleteWhenTimeLeft: json['markCompleteWhenTimeLeft'] == null
|
||||
? const Duration(seconds: 15)
|
||||
: Duration(
|
||||
microseconds: (json['markCompleteWhenTimeLeft'] as num).toInt(),
|
||||
),
|
||||
configurePlayerForEveryBook:
|
||||
json['configurePlayerForEveryBook'] as bool? ?? true,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$PlayerSettingsImplToJson(
|
||||
_$PlayerSettingsImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'miniPlayerSettings': instance.miniPlayerSettings,
|
||||
'expandedPlayerSettings': instance.expandedPlayerSettings,
|
||||
'preferredDefaultVolume': instance.preferredDefaultVolume,
|
||||
'preferredDefaultSpeed': instance.preferredDefaultSpeed,
|
||||
'speedOptions': instance.speedOptions,
|
||||
'speedIncrement': instance.speedIncrement,
|
||||
'minSpeed': instance.minSpeed,
|
||||
'maxSpeed': instance.maxSpeed,
|
||||
'minimumPositionForReporting':
|
||||
instance.minimumPositionForReporting.inMicroseconds,
|
||||
'playbackReportInterval': instance.playbackReportInterval.inMicroseconds,
|
||||
'markCompleteWhenTimeLeft':
|
||||
instance.markCompleteWhenTimeLeft.inMicroseconds,
|
||||
'configurePlayerForEveryBook': instance.configurePlayerForEveryBook,
|
||||
};
|
||||
Map<String, dynamic> _$PlayerSettingsToJson(
|
||||
_PlayerSettings instance,
|
||||
) => <String, dynamic>{
|
||||
'miniPlayerSettings': instance.miniPlayerSettings,
|
||||
'expandedPlayerSettings': instance.expandedPlayerSettings,
|
||||
'preferredDefaultVolume': instance.preferredDefaultVolume,
|
||||
'preferredDefaultSpeed': instance.preferredDefaultSpeed,
|
||||
'speedOptions': instance.speedOptions,
|
||||
'speedIncrement': instance.speedIncrement,
|
||||
'minSpeed': instance.minSpeed,
|
||||
'maxSpeed': instance.maxSpeed,
|
||||
'minimumPositionForReporting':
|
||||
instance.minimumPositionForReporting.inMicroseconds,
|
||||
'playbackReportInterval': instance.playbackReportInterval.inMicroseconds,
|
||||
'markCompleteWhenTimeLeft': instance.markCompleteWhenTimeLeft.inMicroseconds,
|
||||
'configurePlayerForEveryBook': instance.configurePlayerForEveryBook,
|
||||
};
|
||||
|
||||
_$ExpandedPlayerSettingsImpl _$$ExpandedPlayerSettingsImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$ExpandedPlayerSettingsImpl(
|
||||
showTotalProgress: json['showTotalProgress'] as bool? ?? false,
|
||||
showChapterProgress: json['showChapterProgress'] as bool? ?? true,
|
||||
);
|
||||
_ExpandedPlayerSettings _$ExpandedPlayerSettingsFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _ExpandedPlayerSettings(
|
||||
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,
|
||||
};
|
||||
Map<String, dynamic> _$ExpandedPlayerSettingsToJson(
|
||||
_ExpandedPlayerSettings instance,
|
||||
) => <String, dynamic>{
|
||||
'showTotalProgress': instance.showTotalProgress,
|
||||
'showChapterProgress': instance.showChapterProgress,
|
||||
};
|
||||
|
||||
_$MinimizedPlayerSettingsImpl _$$MinimizedPlayerSettingsImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$MinimizedPlayerSettingsImpl(
|
||||
useChapterInfo: json['useChapterInfo'] as bool? ?? false,
|
||||
);
|
||||
_MinimizedPlayerSettings _$MinimizedPlayerSettingsFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _MinimizedPlayerSettings(
|
||||
useChapterInfo: json['useChapterInfo'] as bool? ?? false,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$MinimizedPlayerSettingsImplToJson(
|
||||
_$MinimizedPlayerSettingsImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'useChapterInfo': instance.useChapterInfo,
|
||||
};
|
||||
Map<String, dynamic> _$MinimizedPlayerSettingsToJson(
|
||||
_MinimizedPlayerSettings instance,
|
||||
) => <String, dynamic>{'useChapterInfo': instance.useChapterInfo};
|
||||
|
||||
_$SleepTimerSettingsImpl _$$SleepTimerSettingsImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$SleepTimerSettingsImpl(
|
||||
_SleepTimerSettings _$SleepTimerSettingsFromJson(Map<String, dynamic> json) =>
|
||||
_SleepTimerSettings(
|
||||
defaultDuration: json['defaultDuration'] == null
|
||||
? const Duration(minutes: 15)
|
||||
: Duration(microseconds: (json['defaultDuration'] as num).toInt()),
|
||||
presetDurations: (json['presetDurations'] as List<dynamic>?)
|
||||
presetDurations:
|
||||
(json['presetDurations'] as List<dynamic>?)
|
||||
?.map((e) => Duration(microseconds: (e as num).toInt()))
|
||||
.toList() ??
|
||||
const [
|
||||
|
|
@ -177,7 +181,7 @@ _$SleepTimerSettingsImpl _$$SleepTimerSettingsImplFromJson(
|
|||
Duration(minutes: 10),
|
||||
Duration(minutes: 15),
|
||||
Duration(minutes: 20),
|
||||
Duration(minutes: 30)
|
||||
Duration(minutes: 30),
|
||||
],
|
||||
maxDuration: json['maxDuration'] == null
|
||||
? const Duration(minutes: 100)
|
||||
|
|
@ -189,16 +193,18 @@ _$SleepTimerSettingsImpl _$$SleepTimerSettingsImplFromJson(
|
|||
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)
|
||||
},
|
||||
(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? ?? false,
|
||||
autoTurnOnTime: json['autoTurnOnTime'] == null
|
||||
|
|
@ -209,27 +215,27 @@ _$SleepTimerSettingsImpl _$$SleepTimerSettingsImplFromJson(
|
|||
: Duration(microseconds: (json['autoTurnOffTime'] as num).toInt()),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$SleepTimerSettingsImplToJson(
|
||||
_$SleepTimerSettingsImpl instance) =>
|
||||
Map<String, dynamic> _$SleepTimerSettingsToJson(_SleepTimerSettings instance) =>
|
||||
<String, dynamic>{
|
||||
'defaultDuration': instance.defaultDuration.inMicroseconds,
|
||||
'presetDurations':
|
||||
instance.presetDurations.map((e) => e.inMicroseconds).toList(),
|
||||
'presetDurations': instance.presetDurations
|
||||
.map((e) => e.inMicroseconds)
|
||||
.toList(),
|
||||
'maxDuration': instance.maxDuration.inMicroseconds,
|
||||
'fadeOutAudio': instance.fadeOutAudio,
|
||||
'fadeOutDuration': instance.fadeOutDuration.inMicroseconds,
|
||||
'autoRewindWhenStopped': instance.autoRewindWhenStopped,
|
||||
'autoRewindDurations': instance.autoRewindDurations
|
||||
.map((k, e) => MapEntry(k.toString(), e.inMicroseconds)),
|
||||
'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,
|
||||
};
|
||||
|
||||
_$DownloadSettingsImpl _$$DownloadSettingsImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$DownloadSettingsImpl(
|
||||
_DownloadSettings _$DownloadSettingsFromJson(Map<String, dynamic> json) =>
|
||||
_DownloadSettings(
|
||||
requiresWiFi: json['requiresWiFi'] as bool? ?? true,
|
||||
retries: (json['retries'] as num?)?.toInt() ?? 3,
|
||||
allowPause: json['allowPause'] as bool? ?? true,
|
||||
|
|
@ -239,8 +245,7 @@ _$DownloadSettingsImpl _$$DownloadSettingsImplFromJson(
|
|||
(json['maxConcurrentByGroup'] as num?)?.toInt() ?? 3,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$DownloadSettingsImplToJson(
|
||||
_$DownloadSettingsImpl instance) =>
|
||||
Map<String, dynamic> _$DownloadSettingsToJson(_DownloadSettings instance) =>
|
||||
<String, dynamic>{
|
||||
'requiresWiFi': instance.requiresWiFi,
|
||||
'retries': instance.retries,
|
||||
|
|
@ -250,43 +255,43 @@ Map<String, dynamic> _$$DownloadSettingsImplToJson(
|
|||
'maxConcurrentByGroup': instance.maxConcurrentByGroup,
|
||||
};
|
||||
|
||||
_$NotificationSettingsImpl _$$NotificationSettingsImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$NotificationSettingsImpl(
|
||||
fastForwardInterval: json['fastForwardInterval'] == null
|
||||
? const Duration(seconds: 30)
|
||||
: Duration(
|
||||
microseconds: (json['fastForwardInterval'] as num).toInt()),
|
||||
rewindInterval: json['rewindInterval'] == null
|
||||
? const Duration(seconds: 10)
|
||||
: Duration(microseconds: (json['rewindInterval'] as num).toInt()),
|
||||
progressBarIsChapterProgress:
|
||||
json['progressBarIsChapterProgress'] as bool? ?? true,
|
||||
primaryTitle: json['primaryTitle'] as String? ?? '\$bookTitle',
|
||||
secondaryTitle: json['secondaryTitle'] as String? ?? '\$author',
|
||||
mediaControls: (json['mediaControls'] as List<dynamic>?)
|
||||
?.map((e) => $enumDecode(_$NotificationMediaControlEnumMap, e))
|
||||
.toList() ??
|
||||
const [
|
||||
NotificationMediaControl.rewind,
|
||||
NotificationMediaControl.fastForward,
|
||||
NotificationMediaControl.skipToPreviousChapter,
|
||||
NotificationMediaControl.skipToNextChapter
|
||||
],
|
||||
);
|
||||
_NotificationSettings _$NotificationSettingsFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _NotificationSettings(
|
||||
fastForwardInterval: json['fastForwardInterval'] == null
|
||||
? const Duration(seconds: 30)
|
||||
: Duration(microseconds: (json['fastForwardInterval'] as num).toInt()),
|
||||
rewindInterval: json['rewindInterval'] == null
|
||||
? const Duration(seconds: 10)
|
||||
: Duration(microseconds: (json['rewindInterval'] as num).toInt()),
|
||||
progressBarIsChapterProgress:
|
||||
json['progressBarIsChapterProgress'] as bool? ?? true,
|
||||
primaryTitle: json['primaryTitle'] as String? ?? '\$bookTitle',
|
||||
secondaryTitle: json['secondaryTitle'] as String? ?? '\$author',
|
||||
mediaControls:
|
||||
(json['mediaControls'] as List<dynamic>?)
|
||||
?.map((e) => $enumDecode(_$NotificationMediaControlEnumMap, e))
|
||||
.toList() ??
|
||||
const [
|
||||
NotificationMediaControl.rewind,
|
||||
NotificationMediaControl.fastForward,
|
||||
NotificationMediaControl.skipToPreviousChapter,
|
||||
NotificationMediaControl.skipToNextChapter,
|
||||
],
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$NotificationSettingsImplToJson(
|
||||
_$NotificationSettingsImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'fastForwardInterval': instance.fastForwardInterval.inMicroseconds,
|
||||
'rewindInterval': instance.rewindInterval.inMicroseconds,
|
||||
'progressBarIsChapterProgress': instance.progressBarIsChapterProgress,
|
||||
'primaryTitle': instance.primaryTitle,
|
||||
'secondaryTitle': instance.secondaryTitle,
|
||||
'mediaControls': instance.mediaControls
|
||||
.map((e) => _$NotificationMediaControlEnumMap[e]!)
|
||||
.toList(),
|
||||
};
|
||||
Map<String, dynamic> _$NotificationSettingsToJson(
|
||||
_NotificationSettings instance,
|
||||
) => <String, dynamic>{
|
||||
'fastForwardInterval': instance.fastForwardInterval.inMicroseconds,
|
||||
'rewindInterval': instance.rewindInterval.inMicroseconds,
|
||||
'progressBarIsChapterProgress': instance.progressBarIsChapterProgress,
|
||||
'primaryTitle': instance.primaryTitle,
|
||||
'secondaryTitle': instance.secondaryTitle,
|
||||
'mediaControls': instance.mediaControls
|
||||
.map((e) => _$NotificationMediaControlEnumMap[e]!)
|
||||
.toList(),
|
||||
};
|
||||
|
||||
const _$NotificationMediaControlEnumMap = {
|
||||
NotificationMediaControl.fastForward: 'fastForward',
|
||||
|
|
@ -297,47 +302,47 @@ const _$NotificationMediaControlEnumMap = {
|
|||
NotificationMediaControl.skipToPreviousChapter: 'skipToPreviousChapter',
|
||||
};
|
||||
|
||||
_$ShakeDetectionSettingsImpl _$$ShakeDetectionSettingsImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$ShakeDetectionSettingsImpl(
|
||||
isEnabled: json['isEnabled'] as bool? ?? true,
|
||||
direction:
|
||||
$enumDecodeNullable(_$ShakeDirectionEnumMap, json['direction']) ??
|
||||
ShakeDirection.horizontal,
|
||||
threshold: (json['threshold'] as num?)?.toDouble() ?? 5,
|
||||
shakeAction:
|
||||
$enumDecodeNullable(_$ShakeActionEnumMap, json['shakeAction']) ??
|
||||
ShakeAction.resetSleepTimer,
|
||||
feedback: (json['feedback'] as List<dynamic>?)
|
||||
?.map((e) => $enumDecode(_$ShakeDetectedFeedbackEnumMap, e))
|
||||
.toSet() ??
|
||||
const {ShakeDetectedFeedback.vibrate},
|
||||
beepVolume: (json['beepVolume'] as num?)?.toDouble() ?? 0.5,
|
||||
shakeTriggerCoolDown: json['shakeTriggerCoolDown'] == null
|
||||
? const Duration(seconds: 2)
|
||||
: Duration(
|
||||
microseconds: (json['shakeTriggerCoolDown'] as num).toInt()),
|
||||
shakeTriggerCount: (json['shakeTriggerCount'] as num?)?.toInt() ?? 2,
|
||||
samplingPeriod: json['samplingPeriod'] == null
|
||||
? const Duration(milliseconds: 100)
|
||||
: Duration(microseconds: (json['samplingPeriod'] as num).toInt()),
|
||||
);
|
||||
_ShakeDetectionSettings _$ShakeDetectionSettingsFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _ShakeDetectionSettings(
|
||||
isEnabled: json['isEnabled'] as bool? ?? true,
|
||||
direction:
|
||||
$enumDecodeNullable(_$ShakeDirectionEnumMap, json['direction']) ??
|
||||
ShakeDirection.horizontal,
|
||||
threshold: (json['threshold'] as num?)?.toDouble() ?? 5,
|
||||
shakeAction:
|
||||
$enumDecodeNullable(_$ShakeActionEnumMap, json['shakeAction']) ??
|
||||
ShakeAction.resetSleepTimer,
|
||||
feedback:
|
||||
(json['feedback'] as List<dynamic>?)
|
||||
?.map((e) => $enumDecode(_$ShakeDetectedFeedbackEnumMap, e))
|
||||
.toSet() ??
|
||||
const {ShakeDetectedFeedback.vibrate},
|
||||
beepVolume: (json['beepVolume'] as num?)?.toDouble() ?? 0.5,
|
||||
shakeTriggerCoolDown: json['shakeTriggerCoolDown'] == null
|
||||
? const Duration(seconds: 2)
|
||||
: Duration(microseconds: (json['shakeTriggerCoolDown'] as num).toInt()),
|
||||
shakeTriggerCount: (json['shakeTriggerCount'] as num?)?.toInt() ?? 2,
|
||||
samplingPeriod: json['samplingPeriod'] == null
|
||||
? const Duration(milliseconds: 100)
|
||||
: Duration(microseconds: (json['samplingPeriod'] as num).toInt()),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ShakeDetectionSettingsImplToJson(
|
||||
_$ShakeDetectionSettingsImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'isEnabled': instance.isEnabled,
|
||||
'direction': _$ShakeDirectionEnumMap[instance.direction]!,
|
||||
'threshold': instance.threshold,
|
||||
'shakeAction': _$ShakeActionEnumMap[instance.shakeAction]!,
|
||||
'feedback': instance.feedback
|
||||
.map((e) => _$ShakeDetectedFeedbackEnumMap[e]!)
|
||||
.toList(),
|
||||
'beepVolume': instance.beepVolume,
|
||||
'shakeTriggerCoolDown': instance.shakeTriggerCoolDown.inMicroseconds,
|
||||
'shakeTriggerCount': instance.shakeTriggerCount,
|
||||
'samplingPeriod': instance.samplingPeriod.inMicroseconds,
|
||||
};
|
||||
Map<String, dynamic> _$ShakeDetectionSettingsToJson(
|
||||
_ShakeDetectionSettings instance,
|
||||
) => <String, dynamic>{
|
||||
'isEnabled': instance.isEnabled,
|
||||
'direction': _$ShakeDirectionEnumMap[instance.direction]!,
|
||||
'threshold': instance.threshold,
|
||||
'shakeAction': _$ShakeActionEnumMap[instance.shakeAction]!,
|
||||
'feedback': instance.feedback
|
||||
.map((e) => _$ShakeDetectedFeedbackEnumMap[e]!)
|
||||
.toList(),
|
||||
'beepVolume': instance.beepVolume,
|
||||
'shakeTriggerCoolDown': instance.shakeTriggerCoolDown.inMicroseconds,
|
||||
'shakeTriggerCount': instance.shakeTriggerCount,
|
||||
'samplingPeriod': instance.samplingPeriod.inMicroseconds,
|
||||
};
|
||||
|
||||
const _$ShakeDirectionEnumMap = {
|
||||
ShakeDirection.horizontal: 'horizontal',
|
||||
|
|
@ -357,9 +362,8 @@ const _$ShakeDetectedFeedbackEnumMap = {
|
|||
ShakeDetectedFeedback.beep: 'beep',
|
||||
};
|
||||
|
||||
_$HomePageSettingsImpl _$$HomePageSettingsImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$HomePageSettingsImpl(
|
||||
_HomePageSettings _$HomePageSettingsFromJson(Map<String, dynamic> json) =>
|
||||
_HomePageSettings(
|
||||
showPlayButtonOnContinueListeningShelf:
|
||||
json['showPlayButtonOnContinueListeningShelf'] as bool? ?? true,
|
||||
showPlayButtonOnContinueSeriesShelf:
|
||||
|
|
@ -370,15 +374,14 @@ _$HomePageSettingsImpl _$$HomePageSettingsImplFromJson(
|
|||
json['showPlayButtonOnListenAgainShelf'] as bool? ?? false,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$HomePageSettingsImplToJson(
|
||||
_$HomePageSettingsImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'showPlayButtonOnContinueListeningShelf':
|
||||
instance.showPlayButtonOnContinueListeningShelf,
|
||||
'showPlayButtonOnContinueSeriesShelf':
|
||||
instance.showPlayButtonOnContinueSeriesShelf,
|
||||
'showPlayButtonOnAllRemainingShelves':
|
||||
instance.showPlayButtonOnAllRemainingShelves,
|
||||
'showPlayButtonOnListenAgainShelf':
|
||||
instance.showPlayButtonOnListenAgainShelf,
|
||||
};
|
||||
Map<String, dynamic> _$HomePageSettingsToJson(
|
||||
_HomePageSettings instance,
|
||||
) => <String, dynamic>{
|
||||
'showPlayButtonOnContinueListeningShelf':
|
||||
instance.showPlayButtonOnContinueListeningShelf,
|
||||
'showPlayButtonOnContinueSeriesShelf':
|
||||
instance.showPlayButtonOnContinueSeriesShelf,
|
||||
'showPlayButtonOnAllRemainingShelves':
|
||||
instance.showPlayButtonOnAllRemainingShelves,
|
||||
'showPlayButtonOnListenAgainShelf': instance.showPlayButtonOnListenAgainShelf,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue