custom show fs screenshot btn

Closes #1103

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-08-24 13:59:01 +08:00
parent f942b2a7ee
commit 6c52db1c6c
5 changed files with 16 additions and 3 deletions

View File

@@ -326,6 +326,7 @@ class PlPlayerController {
late final reverseFromFirst = Pref.reverseFromFirst;
late final horizontalPreview = Pref.horizontalPreview;
late final showDmChart = Pref.showDmChart;
late final showFsScreenshotBtn = Pref.showFsScreenshotBtn;
late final bool autoExitFullscreen = Pref.autoExitFullscreen;
late final bool autoPlayEnable = Pref.autoPlayEnable;

View File

@@ -1611,7 +1611,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
),
// 截图
if (isFullScreen)
if (isFullScreen && plPlayerController.showFsScreenshotBtn)
ViewSafeArea(
left: false,
child: Obx(
@@ -1656,6 +1656,8 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
shape: const RoundedRectangleBorder(),
content: GestureDetector(
onTap: () async {
Get.back();
String name = DateTime.now()
.toString();
final SaveResult result =
@@ -1668,7 +1670,6 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
);
if (result.isSuccess) {
Get.back();
SmartDialog.showToast(
'$name.png已保存到相册/截图',
);