opt: videoDetail SliverAppBar height change

This commit is contained in:
guozhigq
2024-11-26 23:31:20 +08:00
parent 388bdc89d8
commit 6ba022828c
2 changed files with 27 additions and 19 deletions

View File

@ -680,8 +680,8 @@ class _VideoDetailPageState extends State<VideoDetailPage>
forceElevated: innerBoxIsScrolled,
expandedHeight: expandedHeight,
backgroundColor: Colors.black,
flexibleSpace: FlexibleSpaceBar(
background: PopScope(
flexibleSpace: SizedBox.expand(
child: PopScope(
canPop:
plPlayerController?.isFullScreen.value != true,
onPopInvoked: (bool didPop) {

View File

@ -739,29 +739,37 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
// 头部、底部控制条
Obx(
() => Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
if (widget.headerControl != null || _.headerControl != null)
ClipRect(
if (widget.headerControl != null || _.headerControl != null) ...[
Flexible(
child: ClipRect(
child: AppBarAni(
controller: animationController,
visible: !_.controlsLock.value && _.showControls.value,
position: 'top',
child: widget.headerControl ?? _.headerControl!,
),
),
),
] else ...[
const SizedBox.shrink()
],
Flexible(
flex: _.videoType == 'live' ? 0 : 1,
child: ClipRect(
child: AppBarAni(
controller: animationController,
visible: !_.controlsLock.value && _.showControls.value,
position: 'top',
child: widget.headerControl ?? _.headerControl!,
position: 'bottom',
child: widget.bottomControl ??
BottomControl(
controller: widget.controller,
triggerFullScreen: _.triggerFullScreen,
buildBottomControl: buildBottomControl(),
),
),
),
const Spacer(),
ClipRect(
child: AppBarAni(
controller: animationController,
visible: !_.controlsLock.value && _.showControls.value,
position: 'bottom',
child: widget.bottomControl ??
BottomControl(
controller: widget.controller,
triggerFullScreen: _.triggerFullScreen,
buildBottomControl: buildBottomControl(),
),
),
),
],
),