mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-20 11:08:03 +08:00
@@ -32,6 +32,7 @@ import 'package:PiliPlus/plugin/pl_player/models/video_fit_type.dart';
|
||||
import 'package:PiliPlus/plugin/pl_player/utils/fullscreen.dart';
|
||||
import 'package:PiliPlus/services/service_locator.dart';
|
||||
import 'package:PiliPlus/utils/accounts.dart';
|
||||
import 'package:PiliPlus/utils/extension/num_ext.dart';
|
||||
import 'package:PiliPlus/utils/extension/string_ext.dart';
|
||||
import 'package:PiliPlus/utils/feed_back.dart';
|
||||
import 'package:PiliPlus/utils/image_utils.dart';
|
||||
@@ -1855,8 +1856,9 @@ class PlPlayerController {
|
||||
videoPlayerController?.screenshot(format: 'image/png').then((value) {
|
||||
if (value != null) {
|
||||
SmartDialog.showToast('点击弹窗保存截图');
|
||||
Get.dialog(
|
||||
GestureDetector(
|
||||
showDialog(
|
||||
context: Get.context!,
|
||||
builder: (context) => GestureDetector(
|
||||
onTap: () {
|
||||
Get.back();
|
||||
ImageUtils.saveByteImg(
|
||||
|
||||
@@ -67,7 +67,7 @@ import 'package:flutter_cache_manager/flutter_cache_manager.dart';
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
import 'package:flutter_volume_controller/flutter_volume_controller.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:get/get.dart' hide ContextExtensionss;
|
||||
import 'package:get/get.dart';
|
||||
import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';
|
||||
import 'package:media_kit_video/media_kit_video.dart';
|
||||
import 'package:screen_brightness_platform_interface/screen_brightness_platform_interface.dart';
|
||||
@@ -177,6 +177,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
||||
animationController.reverse();
|
||||
}
|
||||
});
|
||||
transformationController = TransformationController();
|
||||
animationController = AnimationController(
|
||||
vsync: this,
|
||||
duration: const Duration(milliseconds: 100),
|
||||
@@ -914,7 +915,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
||||
|
||||
bool get isFullScreen => plPlayerController.isFullScreen.value;
|
||||
|
||||
late final transformationController = TransformationController();
|
||||
late final TransformationController transformationController;
|
||||
|
||||
late ColorScheme colorScheme;
|
||||
late double maxWidth;
|
||||
@@ -2149,8 +2150,9 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
||||
WebpPreset preset = WebpPreset.def;
|
||||
|
||||
final success =
|
||||
await Get.dialog<bool>(
|
||||
AlertDialog(
|
||||
await showDialog<bool>(
|
||||
context: Get.context!,
|
||||
builder: (context) => AlertDialog(
|
||||
title: const Text('动态截图'),
|
||||
content: Column(
|
||||
spacing: 12,
|
||||
|
||||
@@ -15,40 +15,45 @@ class AppBarAni extends StatelessWidget {
|
||||
final bool isTop;
|
||||
final bool isFullScreen;
|
||||
|
||||
static final _topPos = Tween<Offset>(
|
||||
begin: const Offset(0, -1),
|
||||
end: Offset.zero,
|
||||
);
|
||||
|
||||
static const _topDecoration = LinearGradient(
|
||||
begin: Alignment.bottomCenter,
|
||||
end: Alignment.topCenter,
|
||||
colors: <Color>[
|
||||
Colors.transparent,
|
||||
Color(0xBF000000),
|
||||
],
|
||||
tileMode: TileMode.mirror,
|
||||
);
|
||||
|
||||
static final _bottomPos = Tween<Offset>(
|
||||
begin: const Offset(0, 1.2),
|
||||
end: Offset.zero,
|
||||
);
|
||||
|
||||
static const _bottomDecoration = LinearGradient(
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
colors: <Color>[
|
||||
Colors.transparent,
|
||||
Color(0xBF000000),
|
||||
],
|
||||
tileMode: TileMode.mirror,
|
||||
);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SlideTransition(
|
||||
position:
|
||||
Tween<Offset>(
|
||||
begin: isTop ? const Offset(0, -1) : const Offset(0, 1.2),
|
||||
end: Offset.zero,
|
||||
).animate(
|
||||
CurvedAnimation(
|
||||
parent: controller,
|
||||
curve: Curves.linear,
|
||||
),
|
||||
),
|
||||
position: isTop
|
||||
? _topPos.animate(controller)
|
||||
: _bottomPos.animate(controller),
|
||||
child: DecoratedBox(
|
||||
decoration: BoxDecoration(
|
||||
gradient: isTop
|
||||
? const LinearGradient(
|
||||
begin: Alignment.bottomCenter,
|
||||
end: Alignment.topCenter,
|
||||
colors: <Color>[
|
||||
Colors.transparent,
|
||||
Color(0xBF000000),
|
||||
],
|
||||
tileMode: TileMode.mirror,
|
||||
)
|
||||
: const LinearGradient(
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
colors: <Color>[
|
||||
Colors.transparent,
|
||||
Color(0xBF000000),
|
||||
],
|
||||
tileMode: TileMode.mirror,
|
||||
),
|
||||
gradient: isTop ? _topDecoration : _bottomDecoration,
|
||||
),
|
||||
child: ViewSafeArea(
|
||||
left: isFullScreen,
|
||||
|
||||
Reference in New Issue
Block a user