From 20d52198234062affc3f5b2e052355ad1538f83b Mon Sep 17 00:00:00 2001 From: orz12 Date: Tue, 26 Dec 2023 01:30:59 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=AB=96=E5=B1=8F=E8=A7=86=E9=A2=91?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E5=85=A8=E5=B1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/video/detail/view.dart | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/lib/pages/video/detail/view.dart b/lib/pages/video/detail/view.dart index 184a38ec..de35ddaf 100644 --- a/lib/pages/video/detail/view.dart +++ b/lib/pages/video/detail/view.dart @@ -259,22 +259,21 @@ class _VideoDetailPageState extends State headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) { return [ - SliverAppBar( + Obx(() => SliverAppBar( automaticallyImplyLeading: false, pinned: false, elevation: 0, scrolledUnderElevation: 0, forceElevated: innerBoxIsScrolled, - expandedHeight: - plPlayerController?.isFullScreen.value == true || - MediaQuery.of(context).orientation == + expandedHeight: MediaQuery.of(context).orientation == + Orientation.landscape || + plPlayerController?.isFullScreen.value == true + ? MediaQuery.of(context).size.height - + (MediaQuery.of(context).orientation == Orientation.landscape - ? MediaQuery.of(context).size.height - - (MediaQuery.of(context).orientation == - Orientation.landscape - ? 0 - : statusBarHeight) - : videoHeight, + ? 0 + : statusBarHeight) + : videoHeight, backgroundColor: Colors.black, flexibleSpace: FlexibleSpaceBar( background: PopScope( @@ -422,7 +421,7 @@ class _VideoDetailPageState extends State ); }, )), - )), + ))), ]; }, // pinnedHeaderSliverHeightBuilder: () {