fix: 视频详情页hero
This commit is contained in:
@ -98,7 +98,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
|||||||
@override
|
@override
|
||||||
// 离开当前页面时
|
// 离开当前页面时
|
||||||
void didPushNext() async {
|
void didPushNext() async {
|
||||||
if(!_meeduPlayerController!.pipEnabled){
|
if (!_meeduPlayerController!.pipEnabled) {
|
||||||
_meeduPlayerController!.pause();
|
_meeduPlayerController!.pause();
|
||||||
}
|
}
|
||||||
super.didPushNext();
|
super.didPushNext();
|
||||||
@ -162,53 +162,53 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
|||||||
double maxHeight = boxConstraints.maxHeight;
|
double maxHeight = boxConstraints.maxHeight;
|
||||||
// double PR =
|
// double PR =
|
||||||
// MediaQuery.of(context).devicePixelRatio;
|
// MediaQuery.of(context).devicePixelRatio;
|
||||||
return Stack(
|
return Hero(
|
||||||
children: [
|
tag: videoDetailController.heroTag,
|
||||||
AspectRatio(
|
child: Stack(
|
||||||
aspectRatio: 16 / 9,
|
children: [
|
||||||
child: MeeduVideoPlayer(
|
AspectRatio(
|
||||||
controller: _meeduPlayerController!,
|
aspectRatio: 16 / 9,
|
||||||
header: (BuildContext context,
|
child: MeeduVideoPlayer(
|
||||||
MeeduPlayerController
|
controller: _meeduPlayerController!,
|
||||||
_meeduPlayerController,
|
header: (BuildContext context,
|
||||||
Responsive) {
|
MeeduPlayerController
|
||||||
return AppBar(
|
_meeduPlayerController,
|
||||||
toolbarHeight: 40,
|
Responsive) {
|
||||||
backgroundColor: Colors.transparent,
|
return AppBar(
|
||||||
primary: false,
|
toolbarHeight: 40,
|
||||||
elevation: 0,
|
backgroundColor: Colors.transparent,
|
||||||
scrolledUnderElevation: 0,
|
primary: false,
|
||||||
foregroundColor: Colors.white,
|
elevation: 0,
|
||||||
leading: IconButton(
|
scrolledUnderElevation: 0,
|
||||||
onPressed: () {
|
foregroundColor: Colors.white,
|
||||||
Get.back();
|
leading: IconButton(
|
||||||
},
|
onPressed: () {
|
||||||
icon: const Icon(
|
Get.back();
|
||||||
Icons.arrow_back_ios,
|
},
|
||||||
size: 19,
|
icon: const Icon(
|
||||||
|
Icons.arrow_back_ios,
|
||||||
|
size: 19,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
title: Text(
|
||||||
title: Text(
|
'视频详情',
|
||||||
'视频详情',
|
style: TextStyle(
|
||||||
style: TextStyle(
|
color: Colors.white,
|
||||||
color: Colors.white,
|
fontSize: Theme.of(context)
|
||||||
fontSize: Theme.of(context)
|
.textTheme
|
||||||
.textTheme
|
.titleSmall!
|
||||||
.titleSmall!
|
.fontSize),
|
||||||
.fontSize),
|
),
|
||||||
),
|
);
|
||||||
);
|
},
|
||||||
},
|
),
|
||||||
),
|
),
|
||||||
),
|
Visibility(
|
||||||
Visibility(
|
visible: isShowCover,
|
||||||
visible: isShowCover,
|
child: Positioned(
|
||||||
child: Positioned(
|
top: 0,
|
||||||
top: 0,
|
left: 0,
|
||||||
left: 0,
|
right: 0,
|
||||||
right: 0,
|
|
||||||
child: Hero(
|
|
||||||
tag: videoDetailController.heroTag,
|
|
||||||
child: NetworkImgLayer(
|
child: NetworkImgLayer(
|
||||||
type: 'emote',
|
type: 'emote',
|
||||||
src: videoDetailController
|
src: videoDetailController
|
||||||
@ -218,8 +218,8 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
],
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user