mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-28 22:35:54 +08:00
win (#1240)
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -13,6 +13,7 @@ import 'package:PiliPlus/services/service_locator.dart';
|
||||
import 'package:PiliPlus/utils/storage.dart';
|
||||
import 'package:PiliPlus/utils/storage_key.dart';
|
||||
import 'package:PiliPlus/utils/storage_pref.dart';
|
||||
import 'package:PiliPlus/utils/utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
import 'package:get/get.dart';
|
||||
@@ -194,7 +195,7 @@ List<SettingsModel> get playSettings => [
|
||||
setKey: SettingBoxKey.autoPiP,
|
||||
defaultVal: false,
|
||||
onChanged: (val) {
|
||||
if (val && !videoPlayerServiceHandler.enableBackgroundPlay) {
|
||||
if (val && !videoPlayerServiceHandler!.enableBackgroundPlay) {
|
||||
SmartDialog.showToast('建议开启后台音频服务');
|
||||
}
|
||||
},
|
||||
@@ -212,7 +213,7 @@ List<SettingsModel> get playSettings => [
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '全屏手势反向',
|
||||
subtitle: '默认播放器中部向上滑动进入全屏,向下退出\n开启后向下全屏,向上退出',
|
||||
leading: Icon(Icons.swap_vert_outlined),
|
||||
leading: Icon(Icons.swap_vert),
|
||||
setKey: SettingBoxKey.fullScreenGestureReverse,
|
||||
defaultVal: false,
|
||||
),
|
||||
@@ -281,17 +282,18 @@ List<SettingsModel> get playSettings => [
|
||||
}
|
||||
},
|
||||
),
|
||||
SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '后台音频服务',
|
||||
subtitle: '避免画中画没有播放暂停功能',
|
||||
leading: const Icon(Icons.volume_up_outlined),
|
||||
setKey: SettingBoxKey.enableBackgroundPlay,
|
||||
defaultVal: true,
|
||||
onChanged: (value) {
|
||||
videoPlayerServiceHandler.enableBackgroundPlay = value;
|
||||
},
|
||||
),
|
||||
if (Utils.isMobile)
|
||||
SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '后台音频服务',
|
||||
subtitle: '避免画中画没有播放暂停功能',
|
||||
leading: const Icon(Icons.volume_up_outlined),
|
||||
setKey: SettingBoxKey.enableBackgroundPlay,
|
||||
defaultVal: true,
|
||||
onChanged: (value) {
|
||||
videoPlayerServiceHandler!.enableBackgroundPlay = value;
|
||||
},
|
||||
),
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '播放器设置仅对当前生效',
|
||||
|
||||
Reference in New Issue
Block a user