mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-20 03:06:59 +08:00
opt set pageTransition
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -480,7 +480,7 @@ List<SettingsModel> get extraSettings => [
|
||||
setKey: SettingBoxKey.refreshDragPercentage,
|
||||
getSubtitle: () => '当前滑动距离: ${Pref.refreshDragPercentage}x',
|
||||
onTap: (setState) async {
|
||||
double? result = await showDialog(
|
||||
final result = await showDialog<double>(
|
||||
context: Get.context!,
|
||||
builder: (context) {
|
||||
return SlideDialog(
|
||||
@@ -509,7 +509,7 @@ List<SettingsModel> get extraSettings => [
|
||||
setKey: SettingBoxKey.refreshDisplacement,
|
||||
getSubtitle: () => '当前指示器高度: ${Pref.refreshDisplacement}',
|
||||
onTap: (setState) async {
|
||||
double? result = await showDialog(
|
||||
final result = await showDialog<double>(
|
||||
context: Get.context!,
|
||||
builder: (context) {
|
||||
return SlideDialog(
|
||||
@@ -585,7 +585,7 @@ List<SettingsModel> get extraSettings => [
|
||||
getSubtitle: () =>
|
||||
'当前:「${Pref.superResolutionType.title}」\n默认设置对番剧生效, 其他视频默认关闭\n超分辨率需要启用硬件解码, 若启用硬件解码后仍然不生效, 尝试切换硬件解码器为 auto-copy',
|
||||
onTap: (setState) async {
|
||||
SuperResolutionType? result = await showDialog(
|
||||
final result = await showDialog<SuperResolutionType>(
|
||||
context: Get.context!,
|
||||
builder: (context) {
|
||||
return SelectDialog<SuperResolutionType>(
|
||||
@@ -992,7 +992,7 @@ List<SettingsModel> get extraSettings => [
|
||||
getSubtitle: () =>
|
||||
'当前优先展示「${ReplySortType.values[Pref.replySortType].title}」',
|
||||
onTap: (setState) async {
|
||||
int? result = await showDialog(
|
||||
final result = await showDialog<int>(
|
||||
context: Get.context!,
|
||||
builder: (context) {
|
||||
return SelectDialog<int>(
|
||||
@@ -1018,7 +1018,7 @@ List<SettingsModel> get extraSettings => [
|
||||
getSubtitle: () =>
|
||||
'当前优先展示「${DynamicsTabType.values[Pref.defaultDynamicType].label}」',
|
||||
onTap: (setState) async {
|
||||
int? result = await showDialog(
|
||||
final result = await showDialog<int>(
|
||||
context: Get.context!,
|
||||
builder: (context) {
|
||||
return SelectDialog<int>(
|
||||
@@ -1044,7 +1044,7 @@ List<SettingsModel> get extraSettings => [
|
||||
leading: const Icon(Icons.tab),
|
||||
getSubtitle: () => '当前优先展示「${Pref.memberTab.title}」',
|
||||
onTap: (setState) async {
|
||||
MemberTabType? result = await showDialog(
|
||||
final result = await showDialog<MemberTabType>(
|
||||
context: Get.context!,
|
||||
builder: (context) {
|
||||
return SelectDialog<MemberTabType>(
|
||||
|
||||
@@ -137,7 +137,7 @@ List<SettingsModel> get playSettings => [
|
||||
getSubtitle: () =>
|
||||
'当前选择偏好:${SubtitlePrefType.values[Pref.subtitlePreferenceV2].desc}',
|
||||
onTap: (setState) async {
|
||||
int? result = await showDialog(
|
||||
final result = await showDialog<int>(
|
||||
context: Get.context!,
|
||||
builder: (context) {
|
||||
return SelectDialog<int>(
|
||||
@@ -284,7 +284,7 @@ List<SettingsModel> get playSettings => [
|
||||
getSubtitle: () =>
|
||||
'当前全屏方向:${FullScreenMode.values[Pref.fullScreenMode].desc}',
|
||||
onTap: (setState) async {
|
||||
int? result = await showDialog(
|
||||
final result = await showDialog<int>(
|
||||
context: Get.context!,
|
||||
builder: (context) {
|
||||
return SelectDialog<int>(
|
||||
@@ -309,7 +309,7 @@ List<SettingsModel> get playSettings => [
|
||||
getSubtitle: () =>
|
||||
'当前展示方式:${BtmProgressBehavior.values[Pref.btmProgressBehavior].desc}',
|
||||
onTap: (setState) async {
|
||||
int? result = await showDialog(
|
||||
final result = await showDialog<int>(
|
||||
context: Get.context!,
|
||||
builder: (context) {
|
||||
return SelectDialog<int>(
|
||||
|
||||
@@ -22,7 +22,6 @@ import 'package:PiliPlus/pages/setting/widgets/multi_select_dialog.dart';
|
||||
import 'package:PiliPlus/pages/setting/widgets/select_dialog.dart';
|
||||
import 'package:PiliPlus/pages/setting/widgets/slide_dialog.dart';
|
||||
import 'package:PiliPlus/plugin/pl_player/utils/fullscreen.dart';
|
||||
import 'package:PiliPlus/router/app_pages.dart';
|
||||
import 'package:PiliPlus/utils/global_data.dart';
|
||||
import 'package:PiliPlus/utils/storage.dart';
|
||||
import 'package:PiliPlus/utils/storage_key.dart';
|
||||
@@ -115,20 +114,19 @@ List<SettingsModel> get styleSettings => [
|
||||
settingsType: SettingsType.normal,
|
||||
title: '页面过渡动画',
|
||||
leading: const Icon(Icons.animation),
|
||||
getSubtitle: () => '当前:${CustomGetPage.pageTransition.name}',
|
||||
getSubtitle: () => '当前:${Pref.pageTransition.name}',
|
||||
onTap: (setState) async {
|
||||
Transition? result = await showDialog(
|
||||
final result = await showDialog<Transition>(
|
||||
context: Get.context!,
|
||||
builder: (context) {
|
||||
return SelectDialog<Transition>(
|
||||
title: '页面过渡动画',
|
||||
value: CustomGetPage.pageTransition,
|
||||
value: Pref.pageTransition,
|
||||
values: Transition.values.map((e) => (e, e.name)).toList(),
|
||||
);
|
||||
},
|
||||
);
|
||||
if (result != null) {
|
||||
CustomGetPage.pageTransition = result;
|
||||
await GStorage.setting.put(SettingBoxKey.pageTransition, result.index);
|
||||
SmartDialog.showToast('重启生效');
|
||||
setState();
|
||||
@@ -155,7 +153,7 @@ List<SettingsModel> get styleSettings => [
|
||||
SettingsModel(
|
||||
settingsType: SettingsType.normal,
|
||||
onTap: (setState) async {
|
||||
double? result = await showDialog(
|
||||
final result = await showDialog<double>(
|
||||
context: Get.context!,
|
||||
builder: (context) {
|
||||
return SlideDialog(
|
||||
@@ -206,7 +204,7 @@ List<SettingsModel> get styleSettings => [
|
||||
leading: const Icon(Icons.person_outlined),
|
||||
getSubtitle: () => '当前:${Pref.upPanelPosition.label}',
|
||||
onTap: (setState) async {
|
||||
UpPanelPosition? result = await showDialog(
|
||||
final result = await showDialog<UpPanelPosition>(
|
||||
context: Get.context!,
|
||||
builder: (context) {
|
||||
return SelectDialog<UpPanelPosition>(
|
||||
@@ -240,7 +238,7 @@ List<SettingsModel> get styleSettings => [
|
||||
SettingsModel(
|
||||
settingsType: SettingsType.normal,
|
||||
onTap: (setState) async {
|
||||
DynamicBadgeMode? result = await showDialog(
|
||||
final result = await showDialog<DynamicBadgeMode>(
|
||||
context: Get.context!,
|
||||
builder: (context) {
|
||||
return SelectDialog<DynamicBadgeMode>(
|
||||
@@ -271,7 +269,7 @@ List<SettingsModel> get styleSettings => [
|
||||
SettingsModel(
|
||||
settingsType: SettingsType.normal,
|
||||
onTap: (setState) async {
|
||||
DynamicBadgeMode? result = await showDialog(
|
||||
final result = await showDialog<DynamicBadgeMode>(
|
||||
context: Get.context!,
|
||||
builder: (context) {
|
||||
return SelectDialog<DynamicBadgeMode>(
|
||||
@@ -521,7 +519,7 @@ List<SettingsModel> get styleSettings => [
|
||||
SettingsModel(
|
||||
settingsType: SettingsType.normal,
|
||||
onTap: (setState) async {
|
||||
double? result = await showDialog(
|
||||
final result = await showDialog<double>(
|
||||
context: Get.context!,
|
||||
builder: (context) {
|
||||
return SlideDialog(
|
||||
@@ -554,7 +552,7 @@ List<SettingsModel> get styleSettings => [
|
||||
SettingsModel(
|
||||
settingsType: SettingsType.normal,
|
||||
onTap: (setState) async {
|
||||
ThemeType? result = await showDialog(
|
||||
final result = await showDialog<ThemeType>(
|
||||
context: Get.context!,
|
||||
builder: (context) {
|
||||
return SelectDialog<ThemeType>(
|
||||
@@ -601,7 +599,7 @@ List<SettingsModel> get styleSettings => [
|
||||
SettingsModel(
|
||||
settingsType: SettingsType.normal,
|
||||
onTap: (setState) async {
|
||||
int? result = await showDialog(
|
||||
final result = await showDialog<int>(
|
||||
context: Get.context!,
|
||||
builder: (context) {
|
||||
return SelectDialog<int>(
|
||||
|
||||
@@ -56,7 +56,7 @@ List<SettingsModel> get videoSettings => [
|
||||
getSubtitle: () =>
|
||||
'当前使用:${VideoUtils.cdnService.desc},部分 CDN 可能失效,如无法播放请尝试切换',
|
||||
onTap: (setState) async {
|
||||
CDNService? result = await showDialog(
|
||||
final result = await showDialog<CDNService>(
|
||||
context: Get.context!,
|
||||
builder: (context) {
|
||||
return const CdnSelectDialog();
|
||||
@@ -145,7 +145,7 @@ List<SettingsModel> get videoSettings => [
|
||||
getSubtitle: () =>
|
||||
'当前画质:${VideoQuality.fromCode(Pref.defaultVideoQa).desc}',
|
||||
onTap: (setState) async {
|
||||
int? result = await showDialog(
|
||||
final result = await showDialog<int>(
|
||||
context: Get.context!,
|
||||
builder: (context) {
|
||||
return SelectDialog<int>(
|
||||
@@ -168,7 +168,7 @@ List<SettingsModel> get videoSettings => [
|
||||
getSubtitle: () =>
|
||||
'当前画质:${VideoQuality.fromCode(Pref.defaultVideoQaCellular).desc}',
|
||||
onTap: (setState) async {
|
||||
int? result = await showDialog(
|
||||
final result = await showDialog<int>(
|
||||
context: Get.context!,
|
||||
builder: (context) {
|
||||
return SelectDialog<int>(
|
||||
@@ -194,7 +194,7 @@ List<SettingsModel> get videoSettings => [
|
||||
getSubtitle: () =>
|
||||
'当前音质:${AudioQuality.fromCode(Pref.defaultAudioQa).desc}',
|
||||
onTap: (setState) async {
|
||||
int? result = await showDialog(
|
||||
final result = await showDialog<int>(
|
||||
context: Get.context!,
|
||||
builder: (context) {
|
||||
return SelectDialog<int>(
|
||||
@@ -217,7 +217,7 @@ List<SettingsModel> get videoSettings => [
|
||||
getSubtitle: () =>
|
||||
'当前音质:${AudioQuality.fromCode(Pref.defaultAudioQaCellular).desc}',
|
||||
onTap: (setState) async {
|
||||
int? result = await showDialog(
|
||||
final result = await showDialog<int>(
|
||||
context: Get.context!,
|
||||
builder: (context) {
|
||||
return SelectDialog<int>(
|
||||
@@ -242,7 +242,7 @@ List<SettingsModel> get videoSettings => [
|
||||
leading: const Icon(Icons.video_settings_outlined),
|
||||
getSubtitle: () => '当前画质:${LiveQuality.fromCode(Pref.liveQuality)?.desc}',
|
||||
onTap: (setState) async {
|
||||
int? result = await showDialog(
|
||||
final result = await showDialog<int>(
|
||||
context: Get.context!,
|
||||
builder: (context) {
|
||||
return SelectDialog<int>(
|
||||
@@ -265,7 +265,7 @@ List<SettingsModel> get videoSettings => [
|
||||
getSubtitle: () =>
|
||||
'当前画质:${LiveQuality.fromCode(Pref.liveQualityCellular)?.desc}',
|
||||
onTap: (setState) async {
|
||||
int? result = await showDialog(
|
||||
final result = await showDialog<int>(
|
||||
context: Get.context!,
|
||||
builder: (context) {
|
||||
return SelectDialog<int>(
|
||||
@@ -288,7 +288,7 @@ List<SettingsModel> get videoSettings => [
|
||||
getSubtitle: () =>
|
||||
'首选解码格式:${VideoDecodeFormatType.fromCode(Pref.defaultDecode).description},请根据设备支持情况与需求调整',
|
||||
onTap: (setState) async {
|
||||
String? result = await showDialog(
|
||||
final result = await showDialog<String>(
|
||||
context: Get.context!,
|
||||
builder: (context) {
|
||||
return SelectDialog<String>(
|
||||
@@ -313,7 +313,7 @@ List<SettingsModel> get videoSettings => [
|
||||
'非杜比视频次选:${VideoDecodeFormatType.fromCode(Pref.secondDecode).description},仍无则选择首个提供的解码格式',
|
||||
leading: const Icon(Icons.swap_horizontal_circle_outlined),
|
||||
onTap: (setState) async {
|
||||
String? result = await showDialog(
|
||||
final result = await showDialog<String>(
|
||||
context: Get.context!,
|
||||
builder: (context) {
|
||||
return SelectDialog<String>(
|
||||
@@ -355,7 +355,7 @@ List<SettingsModel> get videoSettings => [
|
||||
leading: const Icon(Icons.view_timeline_outlined),
|
||||
getSubtitle: () => '当前:${Pref.videoSync}(此项即mpv的--video-sync)',
|
||||
onTap: (setState) async {
|
||||
String? result = await showDialog(
|
||||
final result = await showDialog<String>(
|
||||
context: Get.context!,
|
||||
builder: (context) {
|
||||
return SelectDialog<String>(
|
||||
|
||||
Reference in New Issue
Block a user