From ff47aff7cfe2e0713671d7a27fa8292342c462d3 Mon Sep 17 00:00:00 2001 From: guozhigq Date: Sat, 2 Sep 2023 17:18:08 +0800 Subject: [PATCH] =?UTF-8?q?mod:=20=E6=92=AD=E6=94=BE=E5=81=9C=E6=AD=A2/?= =?UTF-8?q?=E5=AE=8C=E6=88=90=E6=97=B6=EF=BC=8CappBar=E5=8F=AF=E6=94=B6?= =?UTF-8?q?=E8=B5=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/video/detail/view.dart | 3 +- .../pl_player/widgets/bottom_control.dart | 34 +++++-------------- 2 files changed, 9 insertions(+), 28 deletions(-) diff --git a/lib/pages/video/detail/view.dart b/lib/pages/video/detail/view.dart index 6568a716..639773f6 100644 --- a/lib/pages/video/detail/view.dart +++ b/lib/pages/video/detail/view.dart @@ -84,6 +84,7 @@ class _VideoDetailPageState extends State // 播放器状态监听 void playerListener(PlayerStatus? status) { + playerStatus = status!; if (status == PlayerStatus.completed) { // 结束播放退出全屏 if (autoExitFullcreen) { @@ -163,8 +164,6 @@ class _VideoDetailPageState extends State Scaffold( resizeToAvoidBottomInset: false, key: videoDetailController.scaffoldKey, - // fix 1px black line - // backgroundColor: Colors.transparent, backgroundColor: Colors.black, body: ExtendedNestedScrollView( controller: _extendNestCtr, diff --git a/lib/plugin/pl_player/widgets/bottom_control.dart b/lib/plugin/pl_player/widgets/bottom_control.dart index f49e9138..fb0f42b6 100644 --- a/lib/plugin/pl_player/widgets/bottom_control.dart +++ b/lib/plugin/pl_player/widgets/bottom_control.dart @@ -24,18 +24,13 @@ class BottomControl extends StatelessWidget implements PreferredSizeWidget { fontSize: 12, ); - return AppBar( - backgroundColor: Colors.transparent, - foregroundColor: Colors.white, - elevation: 0, - scrolledUnderElevation: 0, - primary: false, - toolbarHeight: 85, - automaticallyImplyLeading: false, - titleSpacing: 14, - title: Column( + return Container( + color: Colors.transparent, + height: 85, + padding: const EdgeInsets.only(left: 14, right: 14), + child: Column( + mainAxisAlignment: MainAxisAlignment.end, children: [ - const SizedBox(height: 17), Obx( () { final int value = _.sliderPosition.value.inSeconds; @@ -45,7 +40,7 @@ class BottomControl extends StatelessWidget implements PreferredSizeWidget { return Container(); } return Padding( - padding: const EdgeInsets.only(left: 7, right: 5, bottom: 6), + padding: const EdgeInsets.only(left: 7, right: 7, bottom: 6), child: ProgressBar( progress: Duration(seconds: value), buffered: Duration(seconds: buffer), @@ -76,20 +71,6 @@ class BottomControl extends StatelessWidget implements PreferredSizeWidget { ), Row( children: [ - // Obx( - // () => ComBtn( - // icon: Icon( - // _.playerStatus.paused - // ? FontAwesomeIcons.play - // : _.playerStatus.playing - // ? FontAwesomeIcons.pause - // : FontAwesomeIcons.rotateRight, - // size: 15, - // color: Colors.white, - // ), - // fuc: () => _.togglePlay(), - // ), - // ), PlayOrPauseButton( controller: _, ), @@ -158,6 +139,7 @@ class BottomControl extends StatelessWidget implements PreferredSizeWidget { ), ], ), + const SizedBox(height: 10), ], ), );