feat: 底部播放进度条设置

This commit is contained in:
guozhigq
2023-08-20 21:01:15 +08:00
parent 8f84c6a6f9
commit 332d5dc38c
5 changed files with 69 additions and 2 deletions

View File

@ -0,0 +1,23 @@
// ignore: camel_case_types
enum BtmProgresBehavior {
alwaysShow,
alwaysHide,
onlyShowFullScreen,
}
extension BtmProgresBehaviorDesc on BtmProgresBehavior {
String get description => ['始终展示', '始终隐藏', '仅全屏时展示'][index];
}
extension BtmProgresBehaviorCode on BtmProgresBehavior {
static final List<int> _codeList = [0, 1, 2];
int get code => _codeList[index];
static BtmProgresBehavior? fromCode(int code) {
final index = _codeList.indexOf(code);
if (index != -1) {
return BtmProgresBehavior.values[index];
}
return null;
}
}