From e5970689a9bada6bdb5b7e62f56b94f9b8cf3b91 Mon Sep 17 00:00:00 2001 From: guozhigq Date: Sat, 17 Jun 2023 13:14:50 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=86=E9=A2=91=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E9=A1=B5hero?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/video/detail/view.dart | 96 ++++++++++++++++---------------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/lib/pages/video/detail/view.dart b/lib/pages/video/detail/view.dart index c2c19c70..243c543f 100644 --- a/lib/pages/video/detail/view.dart +++ b/lib/pages/video/detail/view.dart @@ -98,7 +98,7 @@ class _VideoDetailPageState extends State @override // 离开当前页面时 void didPushNext() async { - if(!_meeduPlayerController!.pipEnabled){ + if (!_meeduPlayerController!.pipEnabled) { _meeduPlayerController!.pause(); } super.didPushNext(); @@ -162,53 +162,53 @@ class _VideoDetailPageState extends State double maxHeight = boxConstraints.maxHeight; // double PR = // MediaQuery.of(context).devicePixelRatio; - return Stack( - children: [ - AspectRatio( - aspectRatio: 16 / 9, - child: MeeduVideoPlayer( - controller: _meeduPlayerController!, - header: (BuildContext context, - MeeduPlayerController - _meeduPlayerController, - Responsive) { - return AppBar( - toolbarHeight: 40, - backgroundColor: Colors.transparent, - primary: false, - elevation: 0, - scrolledUnderElevation: 0, - foregroundColor: Colors.white, - leading: IconButton( - onPressed: () { - Get.back(); - }, - icon: const Icon( - Icons.arrow_back_ios, - size: 19, + return Hero( + tag: videoDetailController.heroTag, + child: Stack( + children: [ + AspectRatio( + aspectRatio: 16 / 9, + child: MeeduVideoPlayer( + controller: _meeduPlayerController!, + header: (BuildContext context, + MeeduPlayerController + _meeduPlayerController, + Responsive) { + return AppBar( + toolbarHeight: 40, + backgroundColor: Colors.transparent, + primary: false, + elevation: 0, + scrolledUnderElevation: 0, + foregroundColor: Colors.white, + leading: IconButton( + onPressed: () { + Get.back(); + }, + icon: const Icon( + Icons.arrow_back_ios, + size: 19, + ), ), - ), - title: Text( - '视频详情', - style: TextStyle( - color: Colors.white, - fontSize: Theme.of(context) - .textTheme - .titleSmall! - .fontSize), - ), - ); - }, + title: Text( + '视频详情', + style: TextStyle( + color: Colors.white, + fontSize: Theme.of(context) + .textTheme + .titleSmall! + .fontSize), + ), + ); + }, + ), ), - ), - Visibility( - visible: isShowCover, - child: Positioned( - top: 0, - left: 0, - right: 0, - child: Hero( - tag: videoDetailController.heroTag, + Visibility( + visible: isShowCover, + child: Positioned( + top: 0, + left: 0, + right: 0, child: NetworkImgLayer( type: 'emote', src: videoDetailController @@ -218,8 +218,8 @@ class _VideoDetailPageState extends State ), ), ), - ), - ], + ], + ), ); }, ),