mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-22 10:06:23 +08:00
@@ -1,39 +1,18 @@
|
||||
enum PlaySpeed {
|
||||
pointFive,
|
||||
pointSevenFive,
|
||||
pointFive(0.5),
|
||||
pointSevenFive(0.75),
|
||||
|
||||
one,
|
||||
onePointTwoFive,
|
||||
onePointFive,
|
||||
onePointSevenFive,
|
||||
one(1.0),
|
||||
onePointTwoFive(1.25),
|
||||
onePointFive(1.5),
|
||||
onePointSevenFive(1.75),
|
||||
|
||||
two,
|
||||
three,
|
||||
}
|
||||
|
||||
extension PlaySpeedExtension on PlaySpeed {
|
||||
static const List<String> _descList = [
|
||||
'0.5',
|
||||
'0.75',
|
||||
'正常',
|
||||
'1.25',
|
||||
'1.5',
|
||||
'1.75',
|
||||
'2.0',
|
||||
'3.0'
|
||||
];
|
||||
String get description => _descList[index];
|
||||
|
||||
static const List<double> _valueList = [
|
||||
0.5,
|
||||
0.75,
|
||||
1.0,
|
||||
1.25,
|
||||
1.5,
|
||||
1.75,
|
||||
2.0,
|
||||
3.0,
|
||||
];
|
||||
double get value => _valueList[index];
|
||||
double get defaultValue => _valueList[3];
|
||||
two(2.0),
|
||||
three(3.0),
|
||||
;
|
||||
|
||||
final double value;
|
||||
const PlaySpeed(this.value);
|
||||
|
||||
String get desc => value == 1.0 ? '正常' : value.toString();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user