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, forceElevated: innerBoxIsScrolled,
expandedHeight: expandedHeight, expandedHeight: expandedHeight,
backgroundColor: Colors.black, backgroundColor: Colors.black,
flexibleSpace: FlexibleSpaceBar( flexibleSpace: SizedBox.expand(
background: PopScope( child: PopScope(
canPop: canPop:
plPlayerController?.isFullScreen.value != true, plPlayerController?.isFullScreen.value != true,
onPopInvoked: (bool didPop) { onPopInvoked: (bool didPop) {

View File

@ -739,9 +739,11 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
// 头部、底部控制条 // 头部、底部控制条
Obx( Obx(
() => Column( () => Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
if (widget.headerControl != null || _.headerControl != null) if (widget.headerControl != null || _.headerControl != null) ...[
ClipRect( Flexible(
child: ClipRect(
child: AppBarAni( child: AppBarAni(
controller: animationController, controller: animationController,
visible: !_.controlsLock.value && _.showControls.value, visible: !_.controlsLock.value && _.showControls.value,
@ -749,8 +751,13 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
child: widget.headerControl ?? _.headerControl!, child: widget.headerControl ?? _.headerControl!,
), ),
), ),
const Spacer(), ),
ClipRect( ] else ...[
const SizedBox.shrink()
],
Flexible(
flex: _.videoType == 'live' ? 0 : 1,
child: ClipRect(
child: AppBarAni( child: AppBarAni(
controller: animationController, controller: animationController,
visible: !_.controlsLock.value && _.showControls.value, visible: !_.controlsLock.value && _.showControls.value,
@ -763,6 +770,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
), ),
), ),
), ),
),
], ],
), ),
), ),