mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: video bs
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -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(
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user