Revert "opt: video page"

This reverts commit 82030b8d06.
This commit is contained in:
bggRGjQaUbCoE
2025-02-28 17:30:50 +08:00
parent c37a631df2
commit 5c029c8f64
2 changed files with 477 additions and 431 deletions

View File

@@ -530,92 +530,115 @@ class _VideoDetailPageState extends State<VideoDetailPage>
} }
} }
Widget get childWhenDisabled => Scaffold( Widget get childWhenDisabled => SafeArea(
resizeToAvoidBottomInset: false, top: !removeSafeArea &&
key: videoDetailController.scaffoldKey, MediaQuery.of(context).orientation == Orientation.portrait &&
// backgroundColor: Colors.black, isFullScreen,
appBar: removeSafeArea bottom: !removeSafeArea &&
? null MediaQuery.of(context).orientation == Orientation.portrait &&
: AppBar( isFullScreen,
backgroundColor: Colors.black, left: false, //!isFullScreen,
toolbarHeight: 0, right: false, //!isFullScreen,
), child: Stack(
body: Column(
children: [ children: [
Obx( Scaffold(
() { resizeToAvoidBottomInset: false,
double videoHeight = context.width * 9 / 16; key: videoDetailController.scaffoldKey,
final double videoWidth = context.width; // backgroundColor: Colors.black,
// debugPrint(videoDetailController.tabCtr.index); appBar: removeSafeArea
if (enableVerticalExpand && ? null
videoDetailController.direction.value == 'vertical') { : AppBar(
videoHeight = context.width; backgroundColor: Colors.black,
} // showStatusBarBackgroundColor ? null : Colors.black,
if (MediaQuery.of(context).orientation == toolbarHeight: 0,
Orientation.landscape && // systemOverlayStyle: SystemUiOverlayStyle(
!horizontalScreen && // statusBarIconBrightness:
!isFullScreen && // Theme.of(context).brightness == Brightness.dark ||
isShowing && // !showStatusBarBackgroundColor
mounted) { // ? Brightness.light
hideStatusBar(); // : Brightness.dark,
} // systemNavigationBarColor: Colors.transparent,
if (MediaQuery.of(context).orientation == // ),
Orientation.portrait &&
!isFullScreen &&
isShowing &&
mounted) {
if (videoDetailController.imageStatus.not &&
removeSafeArea.not) {
showStatusBar();
}
}
return Container(
color: Colors.black,
// showStatusBarBackgroundColor ? null : Colors.black,
height: MediaQuery.of(context).orientation ==
Orientation.landscape ||
isFullScreen
? MediaQuery.sizeOf(context).height -
(MediaQuery.of(context).orientation ==
Orientation.landscape ||
removeSafeArea
? 0
: MediaQuery.of(context).padding.top)
: videoHeight,
width: context.width,
child: PopScope(
canPop: !isFullScreen &&
(horizontalScreen ||
MediaQuery.of(context).orientation ==
Orientation.portrait),
onPopInvokedWithResult: _onPopInvokedWithResult,
child: videoPlayer(videoWidth, videoHeight),
),
);
},
),
Expanded(
child: Scaffold(
key: videoDetailController.childKey,
resizeToAvoidBottomInset: false,
backgroundColor: Colors.transparent,
body: Column(
children: [
buildTabbar(
showReply: videoDetailController.showReply,
), ),
Expanded( body: Column(
child: videoTabBarView( children: [
controller: videoDetailController.tabCtr, Obx(
() {
double videoHeight = context.width * 9 / 16;
final double videoWidth = context.width;
// debugPrint(videoDetailController.tabCtr.index);
if (enableVerticalExpand &&
videoDetailController.direction.value == 'vertical') {
videoHeight = context.width;
}
if (MediaQuery.of(context).orientation ==
Orientation.landscape &&
!horizontalScreen &&
!isFullScreen &&
isShowing &&
mounted) {
hideStatusBar();
}
if (MediaQuery.of(context).orientation ==
Orientation.portrait &&
!isFullScreen &&
isShowing &&
mounted) {
if (videoDetailController.imageStatus.not &&
removeSafeArea.not) {
showStatusBar();
}
}
return Container(
color: Colors.black,
// showStatusBarBackgroundColor ? null : Colors.black,
height: MediaQuery.of(context).orientation ==
Orientation.landscape ||
isFullScreen
? MediaQuery.sizeOf(context).height -
(MediaQuery.of(context).orientation ==
Orientation.landscape ||
removeSafeArea
? 0
: MediaQuery.of(context).padding.top)
: videoHeight,
width: context.width,
child: PopScope(
canPop: !isFullScreen &&
(horizontalScreen ||
MediaQuery.of(context).orientation ==
Orientation.portrait),
onPopInvokedWithResult: _onPopInvokedWithResult,
child: videoPlayer(videoWidth, videoHeight),
),
);
},
),
Expanded(
child: Scaffold(
key: videoDetailController.childKey,
resizeToAvoidBottomInset: false,
body: Column(
children: [ children: [
videoIntro(), buildTabbar(
if (videoDetailController.showReply) videoReplyPanel, showReply: videoDetailController.showReply,
if (_shouldShowSeasonPanel) seasonPanel, ),
Expanded(
child: videoTabBarView(
controller: videoDetailController.tabCtr,
children: [
videoIntro(),
if (videoDetailController.showReply)
videoReplyPanel,
if (_shouldShowSeasonPanel) seasonPanel,
],
),
),
], ],
), ),
), ),
], ),
), ],
), ),
), ),
], ],
@@ -647,7 +670,6 @@ class _VideoDetailPageState extends State<VideoDetailPage>
child: Scaffold( child: Scaffold(
key: videoDetailController.childKey, key: videoDetailController.childKey,
resizeToAvoidBottomInset: false, resizeToAvoidBottomInset: false,
backgroundColor: Colors.transparent,
body: Column( body: Column(
children: [ children: [
buildTabbar(showReply: videoDetailController.showReply), buildTabbar(showReply: videoDetailController.showReply),
@@ -692,7 +714,6 @@ class _VideoDetailPageState extends State<VideoDetailPage>
child: Scaffold( child: Scaffold(
key: videoDetailController.childKey, key: videoDetailController.childKey,
resizeToAvoidBottomInset: false, resizeToAvoidBottomInset: false,
backgroundColor: Colors.transparent,
body: Column( body: Column(
children: [ children: [
buildTabbar( buildTabbar(
@@ -745,7 +766,6 @@ class _VideoDetailPageState extends State<VideoDetailPage>
child: Scaffold( child: Scaffold(
key: videoDetailController.childKey, key: videoDetailController.childKey,
resizeToAvoidBottomInset: false, resizeToAvoidBottomInset: false,
backgroundColor: Colors.transparent,
body: Column( body: Column(
children: [ children: [
buildTabbar( buildTabbar(
@@ -852,7 +872,6 @@ class _VideoDetailPageState extends State<VideoDetailPage>
child: Scaffold( child: Scaffold(
key: videoDetailController.childKey, key: videoDetailController.childKey,
resizeToAvoidBottomInset: false, resizeToAvoidBottomInset: false,
backgroundColor: Colors.transparent,
body: Column( body: Column(
children: [ children: [
buildTabbar( buildTabbar(
@@ -869,13 +888,16 @@ class _VideoDetailPageState extends State<VideoDetailPage>
if (videoDetailController.videoType == if (videoDetailController.videoType ==
SearchType.video && SearchType.video &&
videoDetailController.showRelatedVideo) videoDetailController.showRelatedVideo)
CustomScrollView( Material(
controller: _introController, color: Colors.transparent,
slivers: [ child: CustomScrollView(
RelatedVideoPanel( controller: _introController,
key: relatedVideoPanelKey, slivers: [
heroTag: heroTag), RelatedVideoPanel(
], key: relatedVideoPanelKey,
heroTag: heroTag),
],
),
), ),
if (videoDetailController.showReply) if (videoDetailController.showReply)
videoReplyPanel, videoReplyPanel,
@@ -1483,62 +1505,67 @@ class _VideoDetailPageState extends State<VideoDetailPage>
); );
Widget videoIntro([bool needRelated = true]) { Widget videoIntro([bool needRelated = true]) {
Widget introPanel() => CustomScrollView( Widget introPanel() => Material(
key: const PageStorageKey<String>('简介'), color: Colors.transparent,
controller: needRelated ? _introController : null, child: CustomScrollView(
slivers: [ key: const PageStorageKey<String>('简介'),
if (videoDetailController.videoType == SearchType.video) ...[ controller: needRelated ? _introController : null,
VideoIntroPanel( slivers: [
heroTag: heroTag, if (videoDetailController.videoType == SearchType.video) ...[
showAiBottomSheet: showAiBottomSheet, VideoIntroPanel(
showIntroDetail: showIntroDetail, heroTag: heroTag,
showEpisodes: showEpisodes, showAiBottomSheet: showAiBottomSheet,
onShowMemberPage: onShowMemberPage, showIntroDetail: showIntroDetail,
), showEpisodes: showEpisodes,
if (needRelated && videoDetailController.showRelatedVideo) ...[ onShowMemberPage: onShowMemberPage,
SliverToBoxAdapter( ),
child: Padding( if (needRelated && videoDetailController.showRelatedVideo) ...[
padding: const EdgeInsets.only(top: StyleString.safeSpace), SliverToBoxAdapter(
child: Divider( child: Padding(
height: 1, padding:
indent: 12, const EdgeInsets.only(top: StyleString.safeSpace),
endIndent: 12, child: Divider(
color: Theme.of(context) height: 1,
.colorScheme indent: 12,
.outline endIndent: 12,
.withOpacity(0.08), color: Theme.of(context)
.colorScheme
.outline
.withOpacity(0.08),
),
), ),
), ),
), RelatedVideoPanel(
RelatedVideoPanel(key: relatedVideoPanelKey, heroTag: heroTag), key: relatedVideoPanelKey, heroTag: heroTag),
] else ] else
SliverToBoxAdapter( SliverToBoxAdapter(
child: SizedBox( child: SizedBox(
height: MediaQuery.paddingOf(context).bottom + height: MediaQuery.paddingOf(context).bottom +
StyleString.safeSpace, StyleString.safeSpace,
),
),
] else if (videoDetailController.videoType ==
SearchType.media_bangumi)
Obx(
() => BangumiIntroPanel(
heroTag: heroTag,
cid: videoDetailController.cid.value,
showEpisodes: showEpisodes,
showIntroDetail: showIntroDetail,
), ),
), ),
] else if (videoDetailController.videoType == SliverToBoxAdapter(
SearchType.media_bangumi) child: SizedBox(
Obx( height: MediaQuery.paddingOf(context).bottom +
() => BangumiIntroPanel( (videoDetailController.isPlayAll &&
heroTag: heroTag, MediaQuery.orientationOf(context) ==
cid: videoDetailController.cid.value, Orientation.landscape
showEpisodes: showEpisodes, ? 75
showIntroDetail: showIntroDetail, : 0),
), ),
), )
SliverToBoxAdapter( ],
child: SizedBox( ),
height: MediaQuery.paddingOf(context).bottom +
(videoDetailController.isPlayAll &&
MediaQuery.orientationOf(context) ==
Orientation.landscape
? 75
: 0),
),
)
],
); );
if (videoDetailController.isPlayAll) { if (videoDetailController.isPlayAll) {
return Stack( return Stack(

View File

@@ -613,306 +613,322 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
} }
} }
Widget get childWhenDisabled => Scaffold( Widget get childWhenDisabled => SafeArea(
resizeToAvoidBottomInset: false, top: !removeSafeArea &&
key: videoDetailController.scaffoldKey, MediaQuery.of(context).orientation == Orientation.portrait &&
// backgroundColor: Colors.black, isFullScreen,
appBar: PreferredSize( bottom: !removeSafeArea &&
preferredSize: Size.fromHeight(0), MediaQuery.of(context).orientation == Orientation.portrait &&
child: Stack( isFullScreen,
children: [ left: false, //!isFullScreen,
AppBar( right: false, //!isFullScreen,
backgroundColor: Colors.black, child: Scaffold(
toolbarHeight: 0, resizeToAvoidBottomInset: false,
), key: videoDetailController.scaffoldKey,
if (videoDetailController.scrollRatio.value != 0 && // backgroundColor: Colors.black,
videoDetailController.scrollCtr.offset != 0 && appBar: removeSafeArea
context.orientation == Orientation.portrait) ? null
AppBar( : PreferredSize(
backgroundColor: Theme.of(context) preferredSize: Size.fromHeight(0),
.colorScheme child: Obx(
.surface () => Stack(
.withOpacity(videoDetailController.scrollRatio.value), children: [
toolbarHeight: 0, AppBar(
), backgroundColor: Colors.black,
], toolbarHeight: 0,
), ),
), if (videoDetailController.scrollRatio.value != 0 &&
body: ExtendedNestedScrollView( videoDetailController.scrollCtr.offset != 0 &&
key: videoDetailController.scrollKey, context.orientation == Orientation.portrait)
physics: const NeverScrollableScrollPhysics( AppBar(
parent: ClampingScrollPhysics(), backgroundColor: Theme.of(context)
), .colorScheme
controller: videoDetailController.scrollCtr, .surface
onlyOneScrollInBody: true, .withOpacity(
pinnedHeaderSliverHeightBuilder: () { videoDetailController.scrollRatio.value),
double height = toolbarHeight: 0,
isFullScreen || context.orientation == Orientation.landscape
? MediaQuery.sizeOf(context).height
: videoDetailController.isExpanding ||
videoDetailController.isCollapsing
? animHeight
: videoDetailController.isCollapsing ||
plPlayerController?.playerStatus.status.value ==
PlayerStatus.playing
? videoDetailController.minVideoHeight
: kToolbarHeight;
if (videoDetailController.isExpanding &&
videoDetailController.animationController.value == 1) {
videoDetailController.isExpanding = false;
WidgetsBinding.instance.addPostFrameCallback((_) {
videoDetailController.scrollRatio.value = 0;
refreshPage();
});
} else if (videoDetailController.isCollapsing &&
videoDetailController.animationController.value == 1) {
videoDetailController.isCollapsing = false;
WidgetsBinding.instance.addPostFrameCallback((_) {
refreshPage();
});
}
return height;
},
headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) {
return [
SliverAppBar(
automaticallyImplyLeading: false,
pinned: true,
expandedHeight:
isFullScreen || context.orientation == Orientation.landscape
? MediaQuery.sizeOf(context).height
: videoDetailController.isExpanding ||
videoDetailController.isCollapsing
? animHeight
: videoDetailController.videoHeight,
flexibleSpace: Stack(
children: [
Obx(
() {
final double videoWidth = context.width;
if (MediaQuery.of(context).orientation ==
Orientation.landscape &&
!horizontalScreen &&
!isFullScreen &&
isShowing &&
mounted) {
hideStatusBar();
}
if (MediaQuery.of(context).orientation ==
Orientation.portrait &&
!isFullScreen &&
isShowing &&
mounted) {
if (videoDetailController.imageStatus.not &&
removeSafeArea.not) {
showStatusBar();
}
}
if (removeSafeArea &&
isFullScreen &&
videoDetailController.direction.value ==
'vertical') {
WidgetsBinding.instance.addPostFrameCallback((_) {
refreshPage();
});
}
return Container(
color: Colors.black,
// showStatusBarBackgroundColor ? null : Colors.black,
height: MediaQuery.of(context).orientation ==
Orientation.landscape ||
isFullScreen
? MediaQuery.sizeOf(context).height -
(MediaQuery.of(context).orientation ==
Orientation.landscape ||
removeSafeArea
? 0
: MediaQuery.of(context).padding.top)
: videoDetailController.isExpanding ||
videoDetailController.isCollapsing
? animHeight
: videoDetailController.videoHeight,
width: context.width,
child: PopScope(
canPop: !isFullScreen &&
(horizontalScreen ||
MediaQuery.of(context).orientation ==
Orientation.portrait),
onPopInvokedWithResult: _onPopInvokedWithResult,
child: videoPlayer(
videoWidth,
context.orientation == Orientation.landscape ||
isFullScreen
? context.height
: videoDetailController.isExpanding ||
videoDetailController.isCollapsing
? animHeight
: videoDetailController.videoHeight,
),
), ),
); ],
},
), ),
Obx( ),
() { ),
Widget toolbar() => Opacity( body: ExtendedNestedScrollView(
opacity: videoDetailController.scrollRatio.value, key: videoDetailController.scrollKey,
child: Container( physics: const NeverScrollableScrollPhysics(
color: Theme.of(context).colorScheme.surface, parent: ClampingScrollPhysics(),
alignment: Alignment.topCenter, ),
child: SizedBox( controller: videoDetailController.scrollCtr,
height: kToolbarHeight, onlyOneScrollInBody: true,
child: Stack( pinnedHeaderSliverHeightBuilder: () {
children: [ double height = isFullScreen ||
Align( context.orientation == Orientation.landscape
alignment: Alignment.centerLeft, ? MediaQuery.sizeOf(context).height
child: Row( : videoDetailController.isExpanding ||
mainAxisSize: MainAxisSize.min, videoDetailController.isCollapsing
children: [ ? animHeight
SizedBox( : videoDetailController.isCollapsing ||
width: 42, plPlayerController?.playerStatus.status.value ==
height: 34, PlayerStatus.playing
child: IconButton( ? videoDetailController.minVideoHeight
tooltip: '返回', : kToolbarHeight;
icon: Icon( if (videoDetailController.isExpanding &&
FontAwesomeIcons.arrowLeft, videoDetailController.animationController.value == 1) {
size: 15, videoDetailController.isExpanding = false;
color: Theme.of(context) WidgetsBinding.instance.addPostFrameCallback((_) {
.colorScheme videoDetailController.scrollRatio.value = 0;
.onSurface, refreshPage();
});
} else if (videoDetailController.isCollapsing &&
videoDetailController.animationController.value == 1) {
videoDetailController.isCollapsing = false;
WidgetsBinding.instance.addPostFrameCallback((_) {
refreshPage();
});
}
return height;
},
headerSliverBuilder:
(BuildContext context, bool innerBoxIsScrolled) {
return [
SliverAppBar(
automaticallyImplyLeading: false,
pinned: true,
expandedHeight: isFullScreen ||
context.orientation == Orientation.landscape
? MediaQuery.sizeOf(context).height
: videoDetailController.isExpanding ||
videoDetailController.isCollapsing
? animHeight
: videoDetailController.videoHeight,
flexibleSpace: Stack(
children: [
Obx(
() {
final double videoWidth = context.width;
if (MediaQuery.of(context).orientation ==
Orientation.landscape &&
!horizontalScreen &&
!isFullScreen &&
isShowing &&
mounted) {
hideStatusBar();
}
if (MediaQuery.of(context).orientation ==
Orientation.portrait &&
!isFullScreen &&
isShowing &&
mounted) {
if (videoDetailController.imageStatus.not &&
removeSafeArea.not) {
showStatusBar();
}
}
if (removeSafeArea &&
isFullScreen &&
videoDetailController.direction.value ==
'vertical') {
WidgetsBinding.instance.addPostFrameCallback((_) {
refreshPage();
});
}
return Container(
color: Colors.black,
// showStatusBarBackgroundColor ? null : Colors.black,
height: MediaQuery.of(context).orientation ==
Orientation.landscape ||
isFullScreen
? MediaQuery.sizeOf(context).height -
(MediaQuery.of(context).orientation ==
Orientation.landscape ||
removeSafeArea
? 0
: MediaQuery.of(context).padding.top)
: videoDetailController.isExpanding ||
videoDetailController.isCollapsing
? animHeight
: videoDetailController.videoHeight,
width: context.width,
child: PopScope(
canPop: !isFullScreen &&
(horizontalScreen ||
MediaQuery.of(context).orientation ==
Orientation.portrait),
onPopInvokedWithResult: _onPopInvokedWithResult,
child: videoPlayer(
videoWidth,
context.orientation == Orientation.landscape ||
isFullScreen
? context.height
: videoDetailController.isExpanding ||
videoDetailController.isCollapsing
? animHeight
: videoDetailController.videoHeight,
),
),
);
},
),
Obx(
() {
Widget toolbar() => Opacity(
opacity:
videoDetailController.scrollRatio.value,
child: Container(
color: Theme.of(context).colorScheme.surface,
alignment: Alignment.topCenter,
child: SizedBox(
height: kToolbarHeight,
child: Stack(
children: [
Align(
alignment: Alignment.centerLeft,
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
SizedBox(
width: 42,
height: 34,
child: IconButton(
tooltip: '返回',
icon: Icon(
FontAwesomeIcons.arrowLeft,
size: 15,
color: Theme.of(context)
.colorScheme
.onSurface,
),
onPressed: Get.back,
), ),
onPressed: Get.back,
), ),
), SizedBox(
SizedBox( width: 42,
width: 42, height: 34,
height: 34, child: IconButton(
child: IconButton( tooltip: '返回主页',
tooltip: '返回主页', icon: Icon(
icon: Icon( FontAwesomeIcons.house,
FontAwesomeIcons.house, size: 15,
size: 15, color: Theme.of(context)
color: Theme.of(context) .colorScheme
.colorScheme .onSurface,
.onSurface, ),
onPressed: () {
Get.until((route) =>
route.isFirst);
},
), ),
onPressed: () {
Get.until(
(route) => route.isFirst);
},
), ),
), ],
], ),
), ),
), Center(
Center( child: Row(
child: Row( mainAxisSize: MainAxisSize.min,
mainAxisSize: MainAxisSize.min, children: [
children: [ Icon(
Icon( Icons.play_arrow_rounded,
Icons.play_arrow_rounded,
color: Theme.of(context)
.colorScheme
.primary,
),
Text(
'${videoDetailController.playedTime == null ? '立即' : plPlayerController!.playerStatus.status.value == PlayerStatus.completed ? '重新' : '继续'}播放',
style: TextStyle(
color: Theme.of(context) color: Theme.of(context)
.colorScheme .colorScheme
.primary, .primary,
), ),
), Text(
], '${videoDetailController.playedTime == null ? '立即' : plPlayerController!.playerStatus.status.value == PlayerStatus.completed ? '重新' : '继续'}播放',
style: TextStyle(
color: Theme.of(context)
.colorScheme
.primary,
),
),
],
),
), ),
), ],
], ),
), ),
), ),
),
);
return videoDetailController.scrollRatio.value == 0 ||
videoDetailController.scrollCtr.offset == 0 ||
context.orientation != Orientation.portrait ||
plPlayerController?.playerStatus.status.value ==
PlayerStatus.playing
? const SizedBox.shrink()
: Positioned.fill(
bottom: -2,
child: GestureDetector(
onTap: () async {
if (videoDetailController.isQuerying) {
debugPrint('handlePlay: querying');
return;
}
if (videoDetailController.videoUrl ==
null ||
videoDetailController.audioUrl ==
null) {
debugPrint(
'handlePlay: videoUrl/audioUrl not initialized');
videoDetailController.queryVideoUrl();
return;
}
videoDetailController.scrollRatio.value = 0;
if (plPlayerController == null ||
videoDetailController.playedTime ==
null) {
handlePlay();
} else {
if (plPlayerController!
.videoPlayerController!
.state
.completed) {
await plPlayerController!
.videoPlayerController!
.seek(Duration.zero);
plPlayerController!
.videoPlayerController!
.play();
} else {
plPlayerController!
.videoPlayerController!
.playOrPause();
}
}
},
behavior: HitTestBehavior.opaque,
child: toolbar(),
),
); );
}, return videoDetailController.scrollRatio.value == 0 ||
), videoDetailController.scrollCtr.offset == 0 ||
], context.orientation != Orientation.portrait
), ? const SizedBox.shrink()
), : Positioned.fill(
]; bottom: -2,
}, child: GestureDetector(
body: Scaffold( onTap: () async {
key: videoDetailController.childKey, if (videoDetailController.isQuerying) {
resizeToAvoidBottomInset: false, debugPrint('handlePlay: querying');
body: Column( return;
children: [ }
buildTabbar( if (videoDetailController.videoUrl ==
showReply: videoDetailController.showReply, null ||
onTap: () { videoDetailController.audioUrl ==
videoDetailController null) {
.scrollKey.currentState?.outerController debugPrint(
.animToTop(); 'handlePlay: videoUrl/audioUrl not initialized');
}, videoDetailController.queryVideoUrl();
), return;
Expanded( }
child: videoTabBarView( videoDetailController.scrollRatio.value =
controller: videoDetailController.tabCtr, 0;
children: [ if (plPlayerController == null ||
videoIntro(true, false), videoDetailController.playedTime ==
if (videoDetailController.showReply) null) {
videoReplyPanel(false), handlePlay();
if (_shouldShowSeasonPanel) seasonPanel, } else {
if (plPlayerController!
.videoPlayerController!
.state
.completed) {
await plPlayerController!
.videoPlayerController!
.seek(Duration.zero);
plPlayerController!
.videoPlayerController!
.play();
} else {
plPlayerController!
.videoPlayerController!
.playOrPause();
}
}
},
behavior: HitTestBehavior.opaque,
child: toolbar(),
),
);
},
),
], ],
), ),
), ),
], ];
},
body: Scaffold(
key: videoDetailController.childKey,
resizeToAvoidBottomInset: false,
body: Column(
children: [
buildTabbar(
showReply: videoDetailController.showReply,
onTap: () {
videoDetailController
.scrollKey.currentState?.outerController
.animToTop();
},
),
Expanded(
child: videoTabBarView(
controller: videoDetailController.tabCtr,
children: [
videoIntro(true, false),
if (videoDetailController.showReply)
videoReplyPanel(false),
if (_shouldShowSeasonPanel) seasonPanel,
],
),
),
],
),
), ),
), ),
), ),
@@ -1161,13 +1177,16 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
if (videoDetailController.videoType == if (videoDetailController.videoType ==
SearchType.video && SearchType.video &&
videoDetailController.showRelatedVideo) videoDetailController.showRelatedVideo)
CustomScrollView( Material(
controller: _introController, color: Colors.transparent,
slivers: [ child: CustomScrollView(
RelatedVideoPanel( controller: _introController,
key: relatedVideoPanelKey, slivers: [
heroTag: heroTag), RelatedVideoPanel(
], key: relatedVideoPanelKey,
heroTag: heroTag),
],
),
), ),
if (videoDetailController.showReply) if (videoDetailController.showReply)
videoReplyPanel(), videoReplyPanel(),