mod: lint

mod: tweaks

opt: publish page

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-05-04 11:37:13 +08:00
parent 2cfad80214
commit caa58e9d7d
313 changed files with 2751 additions and 2789 deletions

View File

@@ -6,18 +6,13 @@ enum BtmProgressBehavior {
}
extension BtmProgresBehaviorDesc on BtmProgressBehavior {
String get description => ['始终展示', '始终隐藏', '仅全屏时展示', '仅全屏时隐藏'][index];
String get description => const ['始终展示', '始终隐藏', '仅全屏时展示', '仅全屏时隐藏'][index];
}
extension BtmProgresBehaviorCode on BtmProgressBehavior {
static final List<int> _codeList = [0, 1, 2, 3];
int get code => _codeList[index];
int get code => index;
static BtmProgressBehavior? fromCode(int code) {
final index = _codeList.indexOf(code);
if (index != -1) {
return BtmProgressBehavior.values[index];
}
return null;
static BtmProgressBehavior fromCode(int code) {
return BtmProgressBehavior.values[code];
}
}

View File

@@ -15,7 +15,7 @@ enum FullScreenMode {
}
extension FullScreenModeDesc on FullScreenMode {
String get description => [
String get description => const [
'按视频方向(默认)',
'不改变当前方向',
'强制竖屏',
@@ -26,14 +26,9 @@ extension FullScreenModeDesc on FullScreenMode {
}
extension FullScreenModeCode on FullScreenMode {
static final List<int> _codeList = [0, 1, 2, 3, 4, 5];
int get code => _codeList[index];
int get code => index;
static FullScreenMode? fromCode(int code) {
final index = _codeList.indexOf(code);
if (index != -1) {
return FullScreenMode.values[index];
}
return null;
static FullScreenMode fromCode(int code) {
return FullScreenMode.values[code];
}
}

View File

@@ -7,7 +7,7 @@ enum PlayRepeat {
}
extension PlayRepeatExtension on PlayRepeat {
static final List<String> _descList = <String>[
static const List<String> _descList = <String>[
'播完暂停',
'顺序播放',
'单个循环',
@@ -16,7 +16,7 @@ extension PlayRepeatExtension on PlayRepeat {
];
String get description => _descList[index];
static final List<double> _valueList = [
static const List<double> _valueList = [
1,
2,
3,

View File

@@ -12,7 +12,7 @@ enum PlaySpeed {
}
extension PlaySpeedExtension on PlaySpeed {
static final List<String> _descList = [
static const List<String> _descList = [
'0.5',
'0.75',
'正常',
@@ -24,7 +24,7 @@ extension PlaySpeedExtension on PlaySpeed {
];
String get description => _descList[index];
static final List<double> _valueList = [
static const List<double> _valueList = [
0.5,
0.75,
1.0,