mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2025-12-15 15:39:29 +00:00
speed selector modal
This commit is contained in:
parent
73e8f4bfa6
commit
9dcfbee201
7 changed files with 207 additions and 20 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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()),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue