mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-24 10:08:41 +00:00
opt: settings (#977)
This commit is contained in:
committed by
GitHub
parent
aaad7fc6dc
commit
34c5d6812f
@@ -119,52 +119,52 @@ List<SettingsModel> get extraSettings => [
|
||||
setKey: SettingBoxKey.showViewPoints,
|
||||
defaultVal: true,
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '视频页显示相关视频',
|
||||
leading: const Icon(MdiIcons.motionPlayOutline),
|
||||
leading: Icon(MdiIcons.motionPlayOutline),
|
||||
setKey: SettingBoxKey.showRelatedVideo,
|
||||
defaultVal: true,
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '显示视频评论',
|
||||
leading: const Icon(MdiIcons.commentTextOutline),
|
||||
leading: Icon(MdiIcons.commentTextOutline),
|
||||
setKey: SettingBoxKey.showVideoReply,
|
||||
defaultVal: true,
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '显示番剧评论',
|
||||
leading: const Icon(MdiIcons.commentTextOutline),
|
||||
leading: Icon(MdiIcons.commentTextOutline),
|
||||
setKey: SettingBoxKey.showBangumiReply,
|
||||
defaultVal: true,
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '默认展开视频简介',
|
||||
leading: const Icon(Icons.expand_more),
|
||||
leading: Icon(Icons.expand_more),
|
||||
setKey: SettingBoxKey.alwaysExapndIntroPanel,
|
||||
defaultVal: false,
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '横屏自动展开视频简介',
|
||||
leading: const Icon(Icons.expand_more),
|
||||
leading: Icon(Icons.expand_more),
|
||||
setKey: SettingBoxKey.exapndIntroPanelH,
|
||||
defaultVal: false,
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '横屏分P/合集列表显示在Tab栏',
|
||||
leading: const Icon(Icons.format_list_numbered_rtl_sharp),
|
||||
leading: Icon(Icons.format_list_numbered_rtl_sharp),
|
||||
setKey: SettingBoxKey.horizontalSeasonPanel,
|
||||
defaultVal: false,
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '横屏播放页在侧栏打开UP主页',
|
||||
leading: const Icon(Icons.account_circle_outlined),
|
||||
leading: Icon(Icons.account_circle_outlined),
|
||||
setKey: SettingBoxKey.horizontalMemberPage,
|
||||
defaultVal: false,
|
||||
),
|
||||
@@ -284,40 +284,40 @@ List<SettingsModel> get extraSettings => [
|
||||
);
|
||||
},
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '显示视频警告/争议信息',
|
||||
leading: const Icon(Icons.warning_amber_rounded),
|
||||
leading: Icon(Icons.warning_amber_rounded),
|
||||
setKey: SettingBoxKey.showArgueMsg,
|
||||
defaultVal: true,
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '分P/合集:倒序播放从首集开始播放',
|
||||
subtitle: '开启则自动切换为倒序首集,否则保持当前集',
|
||||
leading: const Icon(MdiIcons.sort),
|
||||
leading: Icon(MdiIcons.sort),
|
||||
setKey: SettingBoxKey.reverseFromFirst,
|
||||
defaultVal: true,
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '禁用 SSL 证书验证',
|
||||
subtitle: '谨慎开启,禁用容易受到中间人攻击',
|
||||
leading: const Icon(Icons.security),
|
||||
leading: Icon(Icons.security),
|
||||
needReboot: true,
|
||||
setKey: SettingBoxKey.badCertificateCallback,
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '显示继续播放分P提示',
|
||||
leading: const Icon(Icons.local_parking),
|
||||
leading: Icon(Icons.local_parking),
|
||||
setKey: SettingBoxKey.continuePlayingPart,
|
||||
defaultVal: true,
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '横屏在侧栏打开图片预览',
|
||||
leading: const Icon(Icons.photo_outlined),
|
||||
leading: Icon(Icons.photo_outlined),
|
||||
setKey: SettingBoxKey.horizontalPreview,
|
||||
defaultVal: false,
|
||||
),
|
||||
@@ -339,10 +339,10 @@ List<SettingsModel> get extraSettings => [
|
||||
DynamicsDataModel.enableFilter = value.pattern.isNotEmpty;
|
||||
},
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '使用外部浏览器打开链接',
|
||||
leading: const Icon(Icons.open_in_browser),
|
||||
leading: Icon(Icons.open_in_browser),
|
||||
setKey: SettingBoxKey.openInBrowser,
|
||||
defaultVal: false,
|
||||
),
|
||||
@@ -402,25 +402,25 @@ List<SettingsModel> get extraSettings => [
|
||||
}
|
||||
},
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '显示会员彩色弹幕',
|
||||
leading: const Icon(MdiIcons.gradientHorizontal),
|
||||
leading: Icon(MdiIcons.gradientHorizontal),
|
||||
setKey: SettingBoxKey.showVipDanmaku,
|
||||
defaultVal: true,
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '显示高级弹幕',
|
||||
leading: const Icon(MdiIcons.paletteAdvanced),
|
||||
leading: Icon(MdiIcons.paletteAdvanced),
|
||||
setKey: SettingBoxKey.showSpecialDanmaku,
|
||||
defaultVal: false,
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '合并弹幕',
|
||||
subtitle: '合并一段时间内获取到的相同弹幕',
|
||||
leading: const Icon(Icons.merge),
|
||||
leading: Icon(Icons.merge),
|
||||
setKey: SettingBoxKey.mergeDanmaku,
|
||||
defaultVal: false,
|
||||
),
|
||||
@@ -550,33 +550,33 @@ List<SettingsModel> get extraSettings => [
|
||||
}
|
||||
},
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '提前初始化播放器',
|
||||
subtitle: '相对减少手动播放加载时间',
|
||||
leading: const Icon(Icons.play_circle_outlined),
|
||||
leading: Icon(Icons.play_circle_outlined),
|
||||
setKey: SettingBoxKey.preInitPlayer,
|
||||
defaultVal: false,
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '首页切换页面动画',
|
||||
leading: const Icon(Icons.home_outlined),
|
||||
leading: Icon(Icons.home_outlined),
|
||||
setKey: SettingBoxKey.mainTabBarView,
|
||||
defaultVal: false,
|
||||
needReboot: true,
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '搜索建议',
|
||||
leading: const Icon(Icons.search),
|
||||
leading: Icon(Icons.search),
|
||||
setKey: SettingBoxKey.searchSuggestion,
|
||||
defaultVal: true,
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '记录搜索历史',
|
||||
leading: const Icon(Icons.history),
|
||||
leading: Icon(Icons.history),
|
||||
setKey: SettingBoxKey.recordSearchHistory,
|
||||
defaultVal: true,
|
||||
),
|
||||
@@ -599,26 +599,26 @@ List<SettingsModel> get extraSettings => [
|
||||
ImageModel.enableLivePhoto = value;
|
||||
},
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '滑动跳转预览视频缩略图',
|
||||
leading: const Icon(Icons.preview_outlined),
|
||||
leading: Icon(Icons.preview_outlined),
|
||||
setKey: SettingBoxKey.showSeekPreview,
|
||||
defaultVal: true,
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '显示高能进度条',
|
||||
subtitle: '高能进度条反应了在时域上,单位时间内弹幕发送量的变化趋势',
|
||||
leading: const Icon(Icons.show_chart),
|
||||
leading: Icon(Icons.show_chart),
|
||||
setKey: SettingBoxKey.showDmChart,
|
||||
defaultVal: false,
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '发评反诈',
|
||||
subtitle: '发送评论后检查评论是否可见',
|
||||
leading: const Stack(
|
||||
leading: Stack(
|
||||
clipBehavior: Clip.none,
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
@@ -629,22 +629,22 @@ List<SettingsModel> get extraSettings => [
|
||||
setKey: SettingBoxKey.enableCommAntifraud,
|
||||
defaultVal: false,
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '使用「哔哩发评反诈」检查评论',
|
||||
subtitle: '仅对Android生效',
|
||||
leading: const Icon(
|
||||
leading: Icon(
|
||||
FontAwesomeIcons.b,
|
||||
size: 22,
|
||||
),
|
||||
setKey: SettingBoxKey.biliSendCommAntifraud,
|
||||
defaultVal: false,
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '发布/转发动态反诈',
|
||||
subtitle: '发布/转发动态后检查动态是否可见',
|
||||
leading: const Stack(
|
||||
leading: Stack(
|
||||
clipBehavior: Clip.none,
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
@@ -702,31 +702,31 @@ List<SettingsModel> get extraSettings => [
|
||||
CommonSlidePageState.slideDismissReplyPage = value;
|
||||
},
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '启用双指缩小视频',
|
||||
leading: const Icon(Icons.pinch),
|
||||
leading: Icon(Icons.pinch),
|
||||
setKey: SettingBoxKey.enableShrinkVideoSize,
|
||||
defaultVal: true,
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '动态/专栏详情页展示底部操作栏',
|
||||
leading: const Icon(Icons.more_horiz),
|
||||
leading: Icon(Icons.more_horiz),
|
||||
setKey: SettingBoxKey.showDynActionBar,
|
||||
defaultVal: true,
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '启用拖拽字幕调整底部边距',
|
||||
leading: const Icon(MdiIcons.dragVariant),
|
||||
leading: Icon(MdiIcons.dragVariant),
|
||||
setKey: SettingBoxKey.enableDragSubtitle,
|
||||
defaultVal: false,
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '展示追番时间表',
|
||||
leading: const Icon(MdiIcons.chartTimelineVariantShimmer),
|
||||
leading: Icon(MdiIcons.chartTimelineVariantShimmer),
|
||||
setKey: SettingBoxKey.showPgcTimeline,
|
||||
defaultVal: true,
|
||||
needReboot: true,
|
||||
@@ -742,19 +742,19 @@ List<SettingsModel> get extraSettings => [
|
||||
title: '震动反馈',
|
||||
subtitle: '请确定手机设置中已开启震动反馈',
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '大家都在搜',
|
||||
subtitle: '是否展示「大家都在搜」',
|
||||
leading: const Icon(Icons.data_thresholding_outlined),
|
||||
leading: Icon(Icons.data_thresholding_outlined),
|
||||
setKey: SettingBoxKey.enableHotKey,
|
||||
defaultVal: true,
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '搜索发现',
|
||||
subtitle: '是否展示「搜索发现」',
|
||||
leading: const Icon(Icons.search_outlined),
|
||||
leading: Icon(Icons.search_outlined),
|
||||
setKey: SettingBoxKey.enableSearchRcmd,
|
||||
defaultVal: true,
|
||||
),
|
||||
@@ -836,34 +836,34 @@ List<SettingsModel> get extraSettings => [
|
||||
ReplyItemGrpc.enableWordRe = value;
|
||||
},
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '启用AI总结',
|
||||
subtitle: '视频详情页开启AI总结',
|
||||
leading: const Icon(Icons.engineering_outlined),
|
||||
leading: Icon(Icons.engineering_outlined),
|
||||
setKey: SettingBoxKey.enableAi,
|
||||
defaultVal: false,
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '消息页禁用"收到的赞"功能',
|
||||
subtitle: '禁止打开入口,降低网络社交依赖',
|
||||
leading: const Icon(Icons.beach_access_outlined),
|
||||
leading: Icon(Icons.beach_access_outlined),
|
||||
setKey: SettingBoxKey.disableLikeMsg,
|
||||
defaultVal: false,
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '默认展示评论区',
|
||||
subtitle: '在视频详情页默认切换至评论区页(仅Tab型布局)',
|
||||
leading: const Icon(Icons.mode_comment_outlined),
|
||||
leading: Icon(Icons.mode_comment_outlined),
|
||||
setKey: SettingBoxKey.defaultShowComment,
|
||||
defaultVal: false,
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '启用HTTP/2',
|
||||
leading: const Icon(Icons.swap_horizontal_circle_outlined),
|
||||
leading: Icon(Icons.swap_horizontal_circle_outlined),
|
||||
setKey: SettingBoxKey.enableHttp2,
|
||||
defaultVal: false,
|
||||
needReboot: true,
|
||||
@@ -1081,11 +1081,11 @@ List<SettingsModel> get extraSettings => [
|
||||
subtitle: '设置代理 host:port',
|
||||
setKey: SettingBoxKey.enableSystemProxy,
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '自动清除缓存',
|
||||
subtitle: '每次启动时清除缓存',
|
||||
leading: const Icon(Icons.auto_delete_outlined),
|
||||
leading: Icon(Icons.auto_delete_outlined),
|
||||
setKey: SettingBoxKey.autoClearCache,
|
||||
defaultVal: false,
|
||||
),
|
||||
|
||||
@@ -8,7 +8,40 @@ import 'package:flutter/services.dart' show FilteringTextInputFormatter;
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
extension SettingsModelExt on SettingsModel {
|
||||
@immutable
|
||||
class SettingsModel {
|
||||
final SettingsType settingsType;
|
||||
final String? title;
|
||||
final StringGetter? getTitle;
|
||||
final String? subtitle;
|
||||
final StringGetter? getSubtitle;
|
||||
final String? setKey;
|
||||
final bool? defaultVal;
|
||||
final ValueChanged<bool>? onChanged;
|
||||
final bool? needReboot;
|
||||
final Widget? leading;
|
||||
final Widget Function()? getTrailing;
|
||||
final Function? onTap;
|
||||
final EdgeInsetsGeometry? contentPadding;
|
||||
final TextStyle? titleStyle;
|
||||
|
||||
const SettingsModel({
|
||||
required this.settingsType,
|
||||
this.title,
|
||||
this.getTitle,
|
||||
this.subtitle,
|
||||
this.getSubtitle,
|
||||
this.setKey,
|
||||
this.defaultVal,
|
||||
this.onChanged,
|
||||
this.needReboot,
|
||||
this.leading,
|
||||
this.getTrailing,
|
||||
this.onTap,
|
||||
this.contentPadding,
|
||||
this.titleStyle,
|
||||
}) : assert(title != null || getTitle != null);
|
||||
|
||||
Widget get widget => switch (settingsType) {
|
||||
SettingsType.normal => NormalItem(
|
||||
title: title,
|
||||
@@ -40,40 +73,6 @@ extension SettingsModelExt on SettingsModel {
|
||||
};
|
||||
}
|
||||
|
||||
class SettingsModel {
|
||||
final SettingsType settingsType;
|
||||
final String? title;
|
||||
final Function? getTitle;
|
||||
final String? subtitle;
|
||||
final Function? getSubtitle;
|
||||
final String? setKey;
|
||||
final bool? defaultVal;
|
||||
final ValueChanged<bool>? onChanged;
|
||||
final bool? needReboot;
|
||||
final Widget? leading;
|
||||
final Function? getTrailing;
|
||||
final Function? onTap;
|
||||
final EdgeInsetsGeometry? contentPadding;
|
||||
final TextStyle? titleStyle;
|
||||
|
||||
SettingsModel({
|
||||
required this.settingsType,
|
||||
this.title,
|
||||
this.getTitle,
|
||||
this.subtitle,
|
||||
this.getSubtitle,
|
||||
this.setKey,
|
||||
this.defaultVal,
|
||||
this.onChanged,
|
||||
this.needReboot,
|
||||
this.leading,
|
||||
this.getTrailing,
|
||||
this.onTap,
|
||||
this.contentPadding,
|
||||
this.titleStyle,
|
||||
});
|
||||
}
|
||||
|
||||
SettingsModel getBanwordModel({
|
||||
required BuildContext context,
|
||||
required String title,
|
||||
|
||||
@@ -19,11 +19,11 @@ import 'package:get/get.dart';
|
||||
import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';
|
||||
|
||||
List<SettingsModel> get playSettings => [
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '弹幕开关',
|
||||
subtitle: '是否展示弹幕',
|
||||
leading: const Icon(CustomIcon.dm_settings),
|
||||
leading: Icon(CustomIcon.dm_settings),
|
||||
setKey: SettingBoxKey.enableShowDanmaku,
|
||||
defaultVal: true,
|
||||
),
|
||||
@@ -34,33 +34,33 @@ List<SettingsModel> get playSettings => [
|
||||
title: '倍速设置',
|
||||
subtitle: '设置视频播放速度',
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '自动播放',
|
||||
subtitle: '进入详情页自动播放',
|
||||
leading: const Icon(Icons.motion_photos_auto_outlined),
|
||||
leading: Icon(Icons.motion_photos_auto_outlined),
|
||||
setKey: SettingBoxKey.autoPlayEnable,
|
||||
defaultVal: false,
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '双击快退/快进',
|
||||
subtitle: '左侧双击快退/右侧双击快进,关闭则双击均为暂停/播放',
|
||||
leading: const Icon(Icons.touch_app_outlined),
|
||||
leading: Icon(Icons.touch_app_outlined),
|
||||
setKey: SettingBoxKey.enableQuickDouble,
|
||||
defaultVal: true,
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '左右侧滑动调节亮度/音量',
|
||||
leading: const Icon(MdiIcons.tuneVerticalVariant),
|
||||
leading: Icon(MdiIcons.tuneVerticalVariant),
|
||||
setKey: SettingBoxKey.enableSlideVolumeBrightness,
|
||||
defaultVal: true,
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '中间滑动进入/退出全屏',
|
||||
leading: const Icon(MdiIcons.panVertical),
|
||||
leading: Icon(MdiIcons.panVertical),
|
||||
setKey: SettingBoxKey.enableSlideFS,
|
||||
defaultVal: true,
|
||||
),
|
||||
@@ -73,10 +73,10 @@ List<SettingsModel> get playSettings => [
|
||||
defaultValue: 10,
|
||||
isFilter: false,
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '滑动快进/快退使用相对时长',
|
||||
leading: const Icon(Icons.swap_horiz_outlined),
|
||||
leading: Icon(Icons.swap_horiz_outlined),
|
||||
setKey: SettingBoxKey.useRelativeSlide,
|
||||
defaultVal: false,
|
||||
),
|
||||
@@ -115,35 +115,35 @@ List<SettingsModel> get playSettings => [
|
||||
}
|
||||
},
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '竖屏扩大展示',
|
||||
subtitle: '小屏竖屏视频宽高比由16:9扩大至1:1(不支持收起);横屏适配时,扩大至9:16',
|
||||
leading: const Icon(Icons.expand_outlined),
|
||||
leading: Icon(Icons.expand_outlined),
|
||||
setKey: SettingBoxKey.enableVerticalExpand,
|
||||
defaultVal: false,
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '自动全屏',
|
||||
subtitle: '视频开始播放时进入全屏',
|
||||
leading: const Icon(Icons.fullscreen_outlined),
|
||||
leading: Icon(Icons.fullscreen_outlined),
|
||||
setKey: SettingBoxKey.enableAutoEnter,
|
||||
defaultVal: false,
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '自动退出全屏',
|
||||
subtitle: '视频结束播放时退出全屏',
|
||||
leading: const Icon(Icons.fullscreen_exit_outlined),
|
||||
leading: Icon(Icons.fullscreen_exit_outlined),
|
||||
setKey: SettingBoxKey.enableAutoExit,
|
||||
defaultVal: true,
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '延长播放控件显示时间',
|
||||
subtitle: '开启后延长至30秒,便于屏幕阅读器滑动切换控件焦点',
|
||||
leading: const Icon(Icons.timer_outlined),
|
||||
leading: Icon(Icons.timer_outlined),
|
||||
setKey: SettingBoxKey.enableLongShowControl,
|
||||
defaultVal: false,
|
||||
),
|
||||
@@ -156,11 +156,11 @@ List<SettingsModel> get playSettings => [
|
||||
defaultVal: true,
|
||||
onChanged: (value) => allowRotateScreen = value,
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '后台播放',
|
||||
subtitle: '进入后台时继续播放',
|
||||
leading: const Icon(Icons.motion_photos_pause_outlined),
|
||||
leading: Icon(Icons.motion_photos_pause_outlined),
|
||||
setKey: SettingBoxKey.continuePlayInBackground,
|
||||
defaultVal: false,
|
||||
),
|
||||
@@ -178,35 +178,35 @@ List<SettingsModel> get playSettings => [
|
||||
}
|
||||
},
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '画中画不加载弹幕',
|
||||
subtitle: '当弹幕开关开启时,小窗屏蔽弹幕以获得较好的体验',
|
||||
leading: const Icon(Icons.subtitles_off_outlined),
|
||||
leading: Icon(Icons.subtitles_off_outlined),
|
||||
setKey: SettingBoxKey.pipNoDanmaku,
|
||||
defaultVal: false,
|
||||
),
|
||||
],
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '全屏手势反向',
|
||||
subtitle: '默认播放器中部向上滑动进入全屏,向下退出\n开启后向下全屏,向上退出',
|
||||
leading: const Icon(Icons.swap_vert_outlined),
|
||||
leading: Icon(Icons.swap_vert_outlined),
|
||||
setKey: SettingBoxKey.fullScreenGestureReverse,
|
||||
defaultVal: false,
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '全屏展示点赞/投币/收藏等操作按钮',
|
||||
leading: const Icon(MdiIcons.dotsHorizontalCircleOutline),
|
||||
leading: Icon(MdiIcons.dotsHorizontalCircleOutline),
|
||||
setKey: SettingBoxKey.showFSActionItem,
|
||||
defaultVal: true,
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '观看人数',
|
||||
subtitle: '展示同时在看人数',
|
||||
leading: const Icon(Icons.people_outlined),
|
||||
leading: Icon(Icons.people_outlined),
|
||||
setKey: SettingBoxKey.enableOnlineTotal,
|
||||
defaultVal: false,
|
||||
),
|
||||
@@ -271,4 +271,12 @@ List<SettingsModel> get playSettings => [
|
||||
videoPlayerServiceHandler.enableBackgroundPlay = value;
|
||||
},
|
||||
),
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '播放器设置仅对当前生效',
|
||||
subtitle: '弹幕、字幕及部分设置中没有的设置除外',
|
||||
leading: Icon(Icons.video_settings_outlined),
|
||||
setKey: SettingBoxKey.tempPlayerConf,
|
||||
defaultVal: false,
|
||||
),
|
||||
];
|
||||
|
||||
@@ -9,20 +9,20 @@ import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
List<SettingsModel> get recommendSettings => [
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '首页使用app端推荐',
|
||||
subtitle: '若web端推荐不太符合预期,可尝试切换至app端推荐',
|
||||
leading: const Icon(Icons.model_training_outlined),
|
||||
leading: Icon(Icons.model_training_outlined),
|
||||
setKey: SettingBoxKey.appRcmd,
|
||||
defaultVal: true,
|
||||
needReboot: true,
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '推荐动态',
|
||||
subtitle: '是否在推荐内容中展示动态(仅app端)',
|
||||
leading: const Icon(Icons.motion_photos_on_outlined),
|
||||
leading: Icon(Icons.motion_photos_on_outlined),
|
||||
setKey: SettingBoxKey.enableRcmdDynamic,
|
||||
defaultVal: true,
|
||||
),
|
||||
|
||||
@@ -47,11 +47,11 @@ List<SettingsModel> get styleSettings => [
|
||||
}
|
||||
},
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '改用侧边栏',
|
||||
subtitle: '开启后底栏与顶栏被替换,且相关设置失效',
|
||||
leading: const Icon(Icons.chrome_reader_mode_outlined),
|
||||
leading: Icon(Icons.chrome_reader_mode_outlined),
|
||||
setKey: SettingBoxKey.useSideBar,
|
||||
defaultVal: false,
|
||||
needReboot: true,
|
||||
@@ -115,19 +115,19 @@ List<SettingsModel> get styleSettings => [
|
||||
}
|
||||
},
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '优化平板导航栏',
|
||||
leading: const Icon(MdiIcons.soundbar),
|
||||
leading: Icon(MdiIcons.soundbar),
|
||||
setKey: SettingBoxKey.optTabletNav,
|
||||
defaultVal: true,
|
||||
needReboot: true,
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: 'MD3样式底栏',
|
||||
subtitle: 'Material You设计规范底栏,关闭可变窄',
|
||||
leading: const Icon(Icons.design_services_outlined),
|
||||
leading: Icon(Icons.design_services_outlined),
|
||||
setKey: SettingBoxKey.enableMYBar,
|
||||
defaultVal: true,
|
||||
needReboot: true,
|
||||
@@ -171,19 +171,19 @@ List<SettingsModel> get styleSettings => [
|
||||
}
|
||||
},
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '播放页移除安全边距',
|
||||
subtitle: '隐藏状态栏、撑满屏幕,但播放控件仍处于安全域内',
|
||||
leading: const Icon(Icons.fit_screen_outlined),
|
||||
leading: Icon(Icons.fit_screen_outlined),
|
||||
setKey: SettingBoxKey.videoPlayerRemoveSafeArea,
|
||||
defaultVal: false,
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '动态页启用瀑布流',
|
||||
subtitle: '关闭会显示为单列',
|
||||
leading: const Icon(Icons.view_array_outlined),
|
||||
leading: Icon(Icons.view_array_outlined),
|
||||
setKey: SettingBoxKey.dynamicsWaterfallFlow,
|
||||
defaultVal: true,
|
||||
needReboot: true,
|
||||
@@ -213,17 +213,17 @@ List<SettingsModel> get styleSettings => [
|
||||
}
|
||||
},
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '动态页显示所有已关注UP主',
|
||||
leading: const Icon(Icons.people_alt_outlined),
|
||||
leading: Icon(Icons.people_alt_outlined),
|
||||
setKey: SettingBoxKey.dynamicsShowAllFollowedUp,
|
||||
defaultVal: false,
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '动态页展开正在直播UP列表',
|
||||
leading: const Icon(Icons.live_tv),
|
||||
leading: Icon(Icons.live_tv),
|
||||
setKey: SettingBoxKey.expandDynLivePanel,
|
||||
defaultVal: false,
|
||||
),
|
||||
@@ -324,20 +324,20 @@ List<SettingsModel> get styleSettings => [
|
||||
getSubtitle: () =>
|
||||
'当前消息类型:${Pref.msgUnReadTypeV2.map((item) => item.title).join('、')}',
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '首页顶栏收起',
|
||||
subtitle: '首页列表滑动时,收起顶栏',
|
||||
leading: const Icon(Icons.vertical_align_top_outlined),
|
||||
leading: Icon(Icons.vertical_align_top_outlined),
|
||||
setKey: SettingBoxKey.hideSearchBar,
|
||||
defaultVal: true,
|
||||
needReboot: true,
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '首页底栏收起',
|
||||
subtitle: '首页列表滑动时,收起底栏',
|
||||
leading: const Icon(Icons.vertical_align_bottom_outlined),
|
||||
leading: Icon(Icons.vertical_align_bottom_outlined),
|
||||
setKey: SettingBoxKey.hideTabBar,
|
||||
defaultVal: true,
|
||||
needReboot: true,
|
||||
|
||||
@@ -17,19 +17,19 @@ import 'package:get/get.dart';
|
||||
import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';
|
||||
|
||||
List<SettingsModel> get videoSettings => [
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '开启硬解',
|
||||
subtitle: '以较低功耗播放视频,若异常卡死请关闭',
|
||||
leading: const Icon(Icons.flash_on_outlined),
|
||||
leading: Icon(Icons.flash_on_outlined),
|
||||
setKey: SettingBoxKey.enableHA,
|
||||
defaultVal: true,
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '免登录1080P',
|
||||
subtitle: '免登录查看1080P视频',
|
||||
leading: const Icon(Icons.hd_outlined),
|
||||
leading: Icon(Icons.hd_outlined),
|
||||
setKey: SettingBoxKey.p1080,
|
||||
defaultVal: true,
|
||||
),
|
||||
@@ -75,10 +75,10 @@ List<SettingsModel> get videoSettings => [
|
||||
}
|
||||
},
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: 'CDN 测速',
|
||||
leading: const Icon(Icons.speed),
|
||||
leading: Icon(Icons.speed),
|
||||
subtitle: '测速通过模拟加载视频实现,注意流量消耗,结果仅供参考',
|
||||
setKey: SettingBoxKey.cdnSpeedTest,
|
||||
defaultVal: true,
|
||||
@@ -301,18 +301,18 @@ List<SettingsModel> get videoSettings => [
|
||||
},
|
||||
),
|
||||
if (Platform.isAndroid)
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '优先使用 OpenSL ES 输出音频',
|
||||
leading: const Icon(Icons.speaker_outlined),
|
||||
leading: Icon(Icons.speaker_outlined),
|
||||
subtitle: '关闭则优先使用AudioTrack输出音频(此项即mpv的--ao),若遇系统音效丢失、无声、音画不同步等问题请尝试关闭。',
|
||||
setKey: SettingBoxKey.useOpenSLES,
|
||||
defaultVal: true,
|
||||
),
|
||||
SettingsModel(
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '扩大缓冲区',
|
||||
leading: const Icon(Icons.storage_outlined),
|
||||
leading: Icon(Icons.storage_outlined),
|
||||
subtitle: '默认缓冲区为视频4MB/直播16MB,开启后为32MB/64MB,加载时间变长',
|
||||
setKey: SettingBoxKey.expandBuffer,
|
||||
defaultVal: false,
|
||||
|
||||
Reference in New Issue
Block a user