fix: 视频全屏时的安全区域

This commit is contained in:
guozhigq
2023-09-18 07:39:56 +08:00
parent f543be562a
commit 8f97431665
2 changed files with 31 additions and 25 deletions

View File

@ -547,34 +547,38 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
),
// 头部、底部控制条
Obx(
() => Column(
children: [
if (widget.headerControl != null || _.headerControl != null)
SafeArea(
top: false,
bottom: false,
child: Obx(
() => Column(
children: [
if (widget.headerControl != null || _.headerControl != null)
ClipRect(
clipBehavior: Clip.hardEdge,
child: AppBarAni(
controller: animationController,
visible: !_.controlsLock.value && _.showControls.value,
position: 'top',
child: widget.headerControl ?? _.headerControl!,
),
),
const Spacer(),
ClipRect(
clipBehavior: Clip.hardEdge,
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:
widget.controller.triggerFullScreen),
),
),
const Spacer(),
ClipRect(
clipBehavior: Clip.hardEdge,
child: AppBarAni(
controller: animationController,
visible: !_.controlsLock.value && _.showControls.value,
position: 'bottom',
child: widget.bottomControl ??
BottomControl(
controller: widget.controller,
triggerFullScreen:
widget.controller.triggerFullScreen),
),
),
],
],
),
),
),