mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-30 23:58:13 +08:00
@@ -902,6 +902,56 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Widget childSplit(double ratio) {
|
||||||
|
final double videoHeight = maxHeight - padding.vertical;
|
||||||
|
final double width = videoHeight * ratio;
|
||||||
|
final videoWidth = isFullScreen ? maxWidth : width;
|
||||||
|
return Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
width: videoWidth,
|
||||||
|
height: videoHeight,
|
||||||
|
child: videoPlayer(
|
||||||
|
width: videoWidth,
|
||||||
|
height: videoHeight,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Offstage(
|
||||||
|
offstage: isFullScreen,
|
||||||
|
child: SizedBox(
|
||||||
|
width: maxWidth - width - padding.horizontal,
|
||||||
|
height: maxHeight - padding.top,
|
||||||
|
child: Scaffold(
|
||||||
|
key: videoDetailController.childKey,
|
||||||
|
resizeToAvoidBottomInset: false,
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
body: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
buildTabbar(),
|
||||||
|
Expanded(
|
||||||
|
child: videoTabBarView(
|
||||||
|
controller: videoDetailController.tabCtr,
|
||||||
|
children: [
|
||||||
|
videoIntro(
|
||||||
|
width: maxWidth - width,
|
||||||
|
height: maxHeight,
|
||||||
|
),
|
||||||
|
if (videoDetailController.showReply) videoReplyPanel(),
|
||||||
|
if (_shouldShowSeasonPanel) seasonPanel,
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
Widget childWhenDisabledLandscapeInner(
|
Widget childWhenDisabledLandscapeInner(
|
||||||
bool isFullScreen,
|
bool isFullScreen,
|
||||||
EdgeInsets padding,
|
EdgeInsets padding,
|
||||||
@@ -974,6 +1024,9 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
|||||||
final videoWidth = isFullScreen ? maxWidth : width;
|
final videoWidth = isFullScreen ? maxWidth : width;
|
||||||
final double height = width * 9 / 16;
|
final double height = width * 9 / 16;
|
||||||
final videoHeight = isFullScreen ? maxHeight : height;
|
final videoHeight = isFullScreen ? maxHeight : height;
|
||||||
|
if (height > maxHeight) {
|
||||||
|
return childSplit(16 / 9);
|
||||||
|
}
|
||||||
final introHeight = maxHeight - height - padding.top;
|
final introHeight = maxHeight - height - padding.top;
|
||||||
return Row(
|
return Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
@@ -1081,54 +1134,7 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
|||||||
if (videoDetailController.isVertical.value &&
|
if (videoDetailController.isVertical.value &&
|
||||||
enableVerticalExpand &&
|
enableVerticalExpand &&
|
||||||
!isPortrait) {
|
!isPortrait) {
|
||||||
final double videoHeight = maxHeight - padding.vertical;
|
return childSplit(9 / 16);
|
||||||
final double width = videoHeight * 9 / 16;
|
|
||||||
final videoWidth = isFullScreen ? maxWidth : width;
|
|
||||||
return Row(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
SizedBox(
|
|
||||||
width: videoWidth,
|
|
||||||
height: videoHeight,
|
|
||||||
child: videoPlayer(
|
|
||||||
width: videoWidth,
|
|
||||||
height: videoHeight,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Offstage(
|
|
||||||
offstage: isFullScreen,
|
|
||||||
child: SizedBox(
|
|
||||||
width: maxWidth - width - padding.horizontal,
|
|
||||||
height: maxHeight - padding.top,
|
|
||||||
child: Scaffold(
|
|
||||||
key: videoDetailController.childKey,
|
|
||||||
resizeToAvoidBottomInset: false,
|
|
||||||
backgroundColor: Colors.transparent,
|
|
||||||
body: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
buildTabbar(),
|
|
||||||
Expanded(
|
|
||||||
child: videoTabBarView(
|
|
||||||
controller: videoDetailController.tabCtr,
|
|
||||||
children: [
|
|
||||||
videoIntro(
|
|
||||||
width: maxWidth - width,
|
|
||||||
height: maxHeight,
|
|
||||||
),
|
|
||||||
if (videoDetailController.showReply)
|
|
||||||
videoReplyPanel(),
|
|
||||||
if (_shouldShowSeasonPanel) seasonPanel,
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
final shouldShowSeasonPanel = _shouldShowSeasonPanel;
|
final shouldShowSeasonPanel = _shouldShowSeasonPanel;
|
||||||
final double height = maxHeight / 2.5;
|
final double height = maxHeight / 2.5;
|
||||||
|
|||||||
Reference in New Issue
Block a user