mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-22 01:56:47 +08:00
@@ -1,28 +1,11 @@
|
||||
enum PlayRepeat {
|
||||
pause,
|
||||
listOrder,
|
||||
singleCycle,
|
||||
listCycle,
|
||||
autoPlayRelated,
|
||||
}
|
||||
pause('播完暂停'),
|
||||
listOrder('顺序播放'),
|
||||
singleCycle('单个循环'),
|
||||
listCycle('列表循环'),
|
||||
autoPlayRelated('自动连播'),
|
||||
;
|
||||
|
||||
extension PlayRepeatExtension on PlayRepeat {
|
||||
static const List<String> _descList = <String>[
|
||||
'播完暂停',
|
||||
'顺序播放',
|
||||
'单个循环',
|
||||
'列表循环',
|
||||
'自动连播',
|
||||
];
|
||||
String get description => _descList[index];
|
||||
|
||||
static const List<double> _valueList = [
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
];
|
||||
double get value => _valueList[index];
|
||||
double get defaultValue => _valueList[1];
|
||||
final String desc;
|
||||
const PlayRepeat(this.desc);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user