This commit is contained in:
orz12
2024-06-17 01:26:52 +08:00
parent ff3484e4b5
commit 45aaa3d075
95 changed files with 282 additions and 282 deletions

View File

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