speed selector modal

This commit is contained in:
Dr-Blank 2024-05-22 02:13:01 -04:00
parent 73e8f4bfa6
commit 9dcfbee201
No known key found for this signature in database
GPG key ID: 7452CC63F210A266
7 changed files with 207 additions and 20 deletions

View file

@ -29,7 +29,7 @@ class PlayerSettings with _$PlayerSettings {
ExpandedPlayerSettings expandedPlayerSettings,
@Default(1) double preferredDefaultVolume,
@Default(1) double preferredDefaultSpeed,
@Default([0.8, 1, 1.25, 1.5, 1.75, 2]) List<double> speedOptions,
@Default([0.75, 1, 1.25, 1.5, 1.75, 2]) List<double> speedOptions,
@Default(Duration(minutes: 15)) Duration sleepTimer,
}) = _PlayerSettings;

View file

@ -399,7 +399,7 @@ class _$PlayerSettingsImpl implements _PlayerSettings {
this.expandedPlayerSettings = const ExpandedPlayerSettings(),
this.preferredDefaultVolume = 1,
this.preferredDefaultSpeed = 1,
final List<double> speedOptions = const [0.8, 1, 1.25, 1.5, 1.75, 2],
final List<double> speedOptions = const [0.75, 1, 1.25, 1.5, 1.75, 2],
this.sleepTimer = const Duration(minutes: 15)})
: _speedOptions = speedOptions;

View file

@ -41,7 +41,7 @@ _$PlayerSettingsImpl _$$PlayerSettingsImplFromJson(Map<String, dynamic> json) =>
speedOptions: (json['speedOptions'] as List<dynamic>?)
?.map((e) => (e as num).toDouble())
.toList() ??
const [0.8, 1, 1.25, 1.5, 1.75, 2],
const [0.75, 1, 1.25, 1.5, 1.75, 2],
sleepTimer: json['sleepTimer'] == null
? const Duration(minutes: 15)
: Duration(microseconds: (json['sleepTimer'] as num).toInt()),