mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-31 16:18:22 +08:00
@@ -460,12 +460,14 @@ class _LiveRoomPageState extends State<LiveRoomPage>
|
|||||||
final isFullScreen = this.isFullScreen;
|
final isFullScreen = this.isFullScreen;
|
||||||
final bottomHeight = 70 + padding.bottom;
|
final bottomHeight = 70 + padding.bottom;
|
||||||
final topPadding = padding.top + kToolbarHeight;
|
final topPadding = padding.top + kToolbarHeight;
|
||||||
final videoHeight = maxHeight - bottomHeight - topPadding;
|
final videoHeight = isFullScreen
|
||||||
|
? maxHeight - padding.top
|
||||||
|
: maxHeight - bottomHeight - topPadding;
|
||||||
return Stack(
|
return Stack(
|
||||||
clipBehavior: Clip.none,
|
clipBehavior: Clip.none,
|
||||||
children: [
|
children: [
|
||||||
Positioned.fill(
|
Positioned.fill(
|
||||||
top: isFullScreen ? 0 : topPadding,
|
top: isFullScreen ? padding.top : topPadding,
|
||||||
bottom: isFullScreen ? 0 : bottomHeight,
|
bottom: isFullScreen ? 0 : bottomHeight,
|
||||||
child: videoPlayerPanel(
|
child: videoPlayerPanel(
|
||||||
width: maxWidth,
|
width: maxWidth,
|
||||||
|
|||||||
@@ -551,20 +551,13 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
|||||||
return Obx(
|
return Obx(
|
||||||
() {
|
() {
|
||||||
final isFullScreen = this.isFullScreen;
|
final isFullScreen = this.isFullScreen;
|
||||||
return Padding(
|
return Scaffold(
|
||||||
padding: EdgeInsets.only(
|
|
||||||
top: isFullScreen && isPortrait ? padding.top : 0,
|
|
||||||
),
|
|
||||||
child: Scaffold(
|
|
||||||
resizeToAvoidBottomInset: false,
|
resizeToAvoidBottomInset: false,
|
||||||
appBar: isFullScreen
|
appBar: PreferredSize(
|
||||||
? null
|
|
||||||
: PreferredSize(
|
|
||||||
preferredSize: const Size.fromHeight(0),
|
preferredSize: const Size.fromHeight(0),
|
||||||
child: Obx(
|
child: Obx(
|
||||||
() {
|
() {
|
||||||
final scrollRatio =
|
final scrollRatio = videoDetailController.scrollRatio.value;
|
||||||
videoDetailController.scrollRatio.value;
|
|
||||||
bool shouldShow =
|
bool shouldShow =
|
||||||
scrollRatio != 0 &&
|
scrollRatio != 0 &&
|
||||||
videoDetailController.scrollCtr.offset != 0 &&
|
videoDetailController.scrollCtr.offset != 0 &&
|
||||||
@@ -579,8 +572,7 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
|||||||
? shouldShow
|
? shouldShow
|
||||||
? null
|
? null
|
||||||
: SystemUiOverlayStyle(
|
: SystemUiOverlayStyle(
|
||||||
statusBarIconBrightness:
|
statusBarIconBrightness: Brightness.light,
|
||||||
Brightness.light,
|
|
||||||
systemNavigationBarIconBrightness:
|
systemNavigationBarIconBrightness:
|
||||||
themeData.brightness.reverse,
|
themeData.brightness.reverse,
|
||||||
)
|
)
|
||||||
@@ -589,7 +581,9 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
|||||||
if (shouldShow)
|
if (shouldShow)
|
||||||
AppBar(
|
AppBar(
|
||||||
backgroundColor: themeData.colorScheme.surface
|
backgroundColor: themeData.colorScheme.surface
|
||||||
.withValues(alpha: scrollRatio),
|
.withValues(
|
||||||
|
alpha: scrollRatio,
|
||||||
|
),
|
||||||
toolbarHeight: 0,
|
toolbarHeight: 0,
|
||||||
systemOverlayStyle: Platform.isAndroid
|
systemOverlayStyle: Platform.isAndroid
|
||||||
? SystemUiOverlayStyle(
|
? SystemUiOverlayStyle(
|
||||||
@@ -637,7 +631,6 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
|||||||
return pinnedHeight;
|
return pinnedHeight;
|
||||||
},
|
},
|
||||||
headerSliverBuilder: (context, innerBoxIsScrolled) {
|
headerSliverBuilder: (context, innerBoxIsScrolled) {
|
||||||
final isFullScreen = this.isFullScreen;
|
|
||||||
final height = isFullScreen || !isPortrait
|
final height = isFullScreen || !isPortrait
|
||||||
? maxHeight - (isPortrait ? padding.top : 0)
|
? maxHeight - (isPortrait ? padding.top : 0)
|
||||||
: videoDetailController.isExpanding ||
|
: videoDetailController.isExpanding ||
|
||||||
@@ -737,9 +730,8 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
|||||||
? '重新'
|
? '重新'
|
||||||
: '继续'}播放',
|
: '继续'}播放',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: themeData
|
color:
|
||||||
.colorScheme
|
themeData.colorScheme.primary,
|
||||||
.primary,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@@ -784,10 +776,8 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
return videoDetailController.scrollRatio.value ==
|
return videoDetailController.scrollRatio.value == 0 ||
|
||||||
0 ||
|
videoDetailController.scrollCtr.offset == 0 ||
|
||||||
videoDetailController.scrollCtr.offset ==
|
|
||||||
0 ||
|
|
||||||
!isPortrait
|
!isPortrait
|
||||||
? const SizedBox.shrink()
|
? const SizedBox.shrink()
|
||||||
: Positioned.fill(
|
: Positioned.fill(
|
||||||
@@ -814,9 +804,7 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
|||||||
videoDetailController.queryVideoUrl();
|
videoDetailController.queryVideoUrl();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
videoDetailController
|
videoDetailController.scrollRatio.value =
|
||||||
.scrollRatio
|
|
||||||
.value =
|
|
||||||
0;
|
0;
|
||||||
if (plPlayerController == null ||
|
if (plPlayerController == null ||
|
||||||
videoDetailController.playedTime ==
|
videoDetailController.playedTime ==
|
||||||
@@ -877,7 +865,6 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user