mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-20 03:06:59 +08:00
@@ -515,42 +515,47 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
final isFullScreen = this.isFullScreen;
|
||||
return Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
appBar: PreferredSize(
|
||||
preferredSize: const Size.fromHeight(0),
|
||||
child: Obx(
|
||||
() {
|
||||
final scrollRatio = videoDetailController.scrollRatio.value;
|
||||
final flag =
|
||||
isPortrait && videoDetailController.scrollCtr.offset != 0;
|
||||
return AppBar(
|
||||
backgroundColor: flag && scrollRatio > 0
|
||||
? Color.lerp(
|
||||
Colors.black,
|
||||
themeData.colorScheme.surface,
|
||||
scrollRatio,
|
||||
)
|
||||
: Colors.black,
|
||||
toolbarHeight: 0,
|
||||
systemOverlayStyle: Platform.isAndroid
|
||||
? SystemUiOverlayStyle(
|
||||
statusBarIconBrightness: flag && scrollRatio >= 0.5
|
||||
? themeData.brightness.reverse
|
||||
: Brightness.light,
|
||||
systemNavigationBarIconBrightness:
|
||||
themeData.brightness.reverse,
|
||||
)
|
||||
: null,
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
appBar: isFullScreen && !isPortrait
|
||||
? null
|
||||
: PreferredSize(
|
||||
preferredSize: const Size.fromHeight(0),
|
||||
child: Obx(
|
||||
() {
|
||||
final scrollRatio =
|
||||
videoDetailController.scrollRatio.value;
|
||||
final flag =
|
||||
isPortrait &&
|
||||
videoDetailController.scrollCtr.offset != 0;
|
||||
return AppBar(
|
||||
backgroundColor: flag && scrollRatio > 0
|
||||
? Color.lerp(
|
||||
Colors.black,
|
||||
themeData.colorScheme.surface,
|
||||
scrollRatio,
|
||||
)
|
||||
: Colors.black,
|
||||
toolbarHeight: 0,
|
||||
systemOverlayStyle: Platform.isAndroid
|
||||
? SystemUiOverlayStyle(
|
||||
statusBarIconBrightness:
|
||||
flag && scrollRatio >= 0.5
|
||||
? themeData.brightness.reverse
|
||||
: Brightness.light,
|
||||
systemNavigationBarIconBrightness:
|
||||
themeData.brightness.reverse,
|
||||
)
|
||||
: null,
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
body: ExtendedNestedScrollView(
|
||||
key: videoDetailController.scrollKey,
|
||||
controller: videoDetailController.scrollCtr,
|
||||
onlyOneScrollInBody: true,
|
||||
pinnedHeaderSliverHeightBuilder: () {
|
||||
double pinnedHeight = this.isFullScreen || !isPortrait
|
||||
? maxHeight - padding.top
|
||||
? maxHeight - (isPortrait ? padding.top : 0)
|
||||
: videoDetailController.isExpanding ||
|
||||
videoDetailController.isCollapsing
|
||||
? animHeight
|
||||
@@ -576,7 +581,7 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
},
|
||||
headerSliverBuilder: (context, innerBoxIsScrolled) {
|
||||
final height = isFullScreen || !isPortrait
|
||||
? maxHeight - padding.top
|
||||
? maxHeight - (isPortrait ? padding.top : 0)
|
||||
: videoDetailController.isExpanding ||
|
||||
videoDetailController.isCollapsing
|
||||
? animHeight
|
||||
@@ -812,7 +817,9 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
final isFullScreen = this.isFullScreen;
|
||||
return Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
appBar: AppBar(backgroundColor: Colors.black, toolbarHeight: 0),
|
||||
appBar: isFullScreen && !isPortrait
|
||||
? null
|
||||
: AppBar(backgroundColor: Colors.black, toolbarHeight: 0),
|
||||
body: Padding(
|
||||
padding: !isFullScreen
|
||||
? padding.copyWith(top: 0, bottom: 0)
|
||||
@@ -945,7 +952,9 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
}
|
||||
final videoWidth = isFullScreen ? maxWidth : width;
|
||||
final double height = width / Style.aspectRatio16x9;
|
||||
final videoHeight = isFullScreen ? maxHeight - padding.top : height;
|
||||
final videoHeight = isFullScreen
|
||||
? maxHeight - (isPortrait ? padding.top : 0)
|
||||
: height;
|
||||
if (height > maxHeight) {
|
||||
return childSplit(Style.aspectRatio16x9);
|
||||
}
|
||||
@@ -1038,7 +1047,9 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
final isFullScreen = this.isFullScreen;
|
||||
return Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
appBar: AppBar(backgroundColor: Colors.black, toolbarHeight: 0),
|
||||
appBar: isFullScreen && !isPortrait
|
||||
? null
|
||||
: AppBar(backgroundColor: Colors.black, toolbarHeight: 0),
|
||||
body: Padding(
|
||||
padding: !isFullScreen
|
||||
? padding.copyWith(top: 0, bottom: 0)
|
||||
@@ -1061,7 +1072,9 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
}
|
||||
final shouldShowSeasonPanel = _shouldShowSeasonPanel;
|
||||
final double height = maxHeight / 2.5;
|
||||
final videoHeight = isFullScreen ? maxHeight - padding.top : height;
|
||||
final videoHeight = isFullScreen
|
||||
? maxHeight - (isPortrait ? padding.top : 0)
|
||||
: height;
|
||||
final bottomHeight = maxHeight - height - padding.top;
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@@ -1514,6 +1527,7 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
Obx(() {
|
||||
if (!videoDetailController.autoPlay) {
|
||||
return Positioned.fill(
|
||||
bottom: -1,
|
||||
child: GestureDetector(
|
||||
onTap: handlePlay,
|
||||
behavior: .opaque,
|
||||
|
||||
Reference in New Issue
Block a user