opt: video bs

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-02-15 23:00:47 +08:00
parent 2ff84857e7
commit ec936c1821
2 changed files with 11 additions and 9 deletions

View File

@@ -1099,6 +1099,7 @@ class _HeaderControlState extends State<HeaderControl> {
widget.controller.danmakuController; widget.controller.danmakuController;
Utils.showFSSheet( Utils.showFSSheet(
isFullScreen: isFullScreen, isFullScreen: isFullScreen,
padding: isFullScreen ? 70 : null,
child: StatefulBuilder( child: StatefulBuilder(
builder: (BuildContext context, StateSetter setState) { builder: (BuildContext context, StateSetter setState) {
return Container( return Container(

View File

@@ -45,7 +45,11 @@ class Utils {
static const channel = MethodChannel("PiliPlus"); static const channel = MethodChannel("PiliPlus");
static void showFSSheet({required Widget child, required bool isFullScreen}) { static void showFSSheet({
required Widget child,
required bool isFullScreen,
double? padding,
}) {
Navigator.of(Get.context!).push( Navigator.of(Get.context!).push(
GetDialogRoute( GetDialogRoute(
pageBuilder: (buildContext, animation, secondaryAnimation) { pageBuilder: (buildContext, animation, secondaryAnimation) {
@@ -55,16 +59,13 @@ class Utils {
children: [ children: [
const Spacer(), const Spacer(),
Expanded(child: child), Expanded(child: child),
if (padding != null) SizedBox(height: padding),
], ],
) )
: Column( : Column(
children: [ children: [
const Spacer(), const Spacer(flex: 3),
ConstrainedBox( Expanded(flex: 7, child: child),
constraints:
BoxConstraints(maxHeight: Get.height * 0.7),
child: child,
),
], ],
) )
: Row( : Row(
@@ -74,14 +75,14 @@ class Utils {
], ],
); );
}, },
transitionDuration: const Duration(milliseconds: 400), transitionDuration: const Duration(milliseconds: 350),
transitionBuilder: (context, animation, secondaryAnimation, child) { transitionBuilder: (context, animation, secondaryAnimation, child) {
Offset begin = Offset begin =
MediaQuery.orientationOf(Get.context!) == Orientation.portrait MediaQuery.orientationOf(Get.context!) == Orientation.portrait
? Offset(0.0, 1.0) ? Offset(0.0, 1.0)
: Offset(1.0, 0.0); : Offset(1.0, 0.0);
var tween = Tween(begin: begin, end: Offset.zero) var tween = Tween(begin: begin, end: Offset.zero)
.chain(CurveTween(curve: Curves.linear)); .chain(CurveTween(curve: Curves.easeInOut));
return SlideTransition( return SlideTransition(
position: animation.drive(tween), position: animation.drive(tween),
child: child, child: child,