opt: video page

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-02-28 14:10:28 +08:00
parent e362f75dac
commit 82030b8d06
2 changed files with 431 additions and 477 deletions

View File

@@ -530,115 +530,92 @@ class _VideoDetailPageState extends State<VideoDetailPage>
} }
} }
Widget get childWhenDisabled => SafeArea( Widget get childWhenDisabled => Scaffold(
top: !removeSafeArea && resizeToAvoidBottomInset: false,
MediaQuery.of(context).orientation == Orientation.portrait && key: videoDetailController.scaffoldKey,
isFullScreen, // backgroundColor: Colors.black,
bottom: !removeSafeArea && appBar: removeSafeArea
MediaQuery.of(context).orientation == Orientation.portrait && ? null
isFullScreen, : AppBar(
left: false, //!isFullScreen, backgroundColor: Colors.black,
right: false, //!isFullScreen, toolbarHeight: 0,
child: Stack( ),
body: Column(
children: [ children: [
Scaffold( Obx(
resizeToAvoidBottomInset: false, () {
key: videoDetailController.scaffoldKey, double videoHeight = context.width * 9 / 16;
// backgroundColor: Colors.black, final double videoWidth = context.width;
appBar: removeSafeArea // debugPrint(videoDetailController.tabCtr.index);
? null if (enableVerticalExpand &&
: AppBar( videoDetailController.direction.value == 'vertical') {
backgroundColor: Colors.black, videoHeight = context.width;
// showStatusBarBackgroundColor ? null : Colors.black, }
toolbarHeight: 0, if (MediaQuery.of(context).orientation ==
// systemOverlayStyle: SystemUiOverlayStyle( Orientation.landscape &&
// statusBarIconBrightness: !horizontalScreen &&
// Theme.of(context).brightness == Brightness.dark || !isFullScreen &&
// !showStatusBarBackgroundColor isShowing &&
// ? Brightness.light mounted) {
// : Brightness.dark, hideStatusBar();
// systemNavigationBarColor: Colors.transparent, }
// ), if (MediaQuery.of(context).orientation ==
), Orientation.portrait &&
body: Column( !isFullScreen &&
children: [ isShowing &&
Obx( mounted) {
() { if (videoDetailController.imageStatus.not &&
double videoHeight = context.width * 9 / 16; removeSafeArea.not) {
final double videoWidth = context.width; showStatusBar();
// debugPrint(videoDetailController.tabCtr.index); }
if (enableVerticalExpand && }
videoDetailController.direction.value == 'vertical') { return Container(
videoHeight = context.width; color: Colors.black,
} // showStatusBarBackgroundColor ? null : Colors.black,
if (MediaQuery.of(context).orientation == height: MediaQuery.of(context).orientation ==
Orientation.landscape && Orientation.landscape ||
!horizontalScreen && isFullScreen
!isFullScreen && ? MediaQuery.sizeOf(context).height -
isShowing && (MediaQuery.of(context).orientation ==
mounted) { Orientation.landscape ||
hideStatusBar(); removeSafeArea
} ? 0
if (MediaQuery.of(context).orientation == : MediaQuery.of(context).padding.top)
Orientation.portrait && : videoHeight,
!isFullScreen && width: context.width,
isShowing && child: PopScope(
mounted) { canPop: !isFullScreen &&
if (videoDetailController.imageStatus.not && (horizontalScreen ||
removeSafeArea.not) { MediaQuery.of(context).orientation ==
showStatusBar(); Orientation.portrait),
} onPopInvokedWithResult: _onPopInvokedWithResult,
} child: videoPlayer(videoWidth, videoHeight),
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, Expanded(
body: Column( child: Scaffold(
key: videoDetailController.childKey,
resizeToAvoidBottomInset: false,
backgroundColor: Colors.transparent,
body: Column(
children: [
buildTabbar(
showReply: videoDetailController.showReply,
),
Expanded(
child: videoTabBarView(
controller: videoDetailController.tabCtr,
children: [ children: [
buildTabbar( videoIntro(),
showReply: videoDetailController.showReply, if (videoDetailController.showReply) videoReplyPanel,
), if (_shouldShowSeasonPanel) seasonPanel,
Expanded(
child: videoTabBarView(
controller: videoDetailController.tabCtr,
children: [
videoIntro(),
if (videoDetailController.showReply)
videoReplyPanel,
if (_shouldShowSeasonPanel) seasonPanel,
],
),
),
], ],
), ),
), ),
), ],
], ),
), ),
), ),
], ],
@@ -670,6 +647,7 @@ 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),
@@ -714,6 +692,7 @@ 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(
@@ -766,6 +745,7 @@ 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(
@@ -872,6 +852,7 @@ 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(
@@ -888,16 +869,13 @@ class _VideoDetailPageState extends State<VideoDetailPage>
if (videoDetailController.videoType == if (videoDetailController.videoType ==
SearchType.video && SearchType.video &&
videoDetailController.showRelatedVideo) videoDetailController.showRelatedVideo)
Material( CustomScrollView(
color: Colors.transparent, controller: _introController,
child: CustomScrollView( slivers: [
controller: _introController, RelatedVideoPanel(
slivers: [ key: relatedVideoPanelKey,
RelatedVideoPanel( heroTag: heroTag),
key: relatedVideoPanelKey, ],
heroTag: heroTag),
],
),
), ),
if (videoDetailController.showReply) if (videoDetailController.showReply)
videoReplyPanel, videoReplyPanel,
@@ -1505,67 +1483,62 @@ class _VideoDetailPageState extends State<VideoDetailPage>
); );
Widget videoIntro([bool needRelated = true]) { Widget videoIntro([bool needRelated = true]) {
Widget introPanel() => Material( Widget introPanel() => CustomScrollView(
color: Colors.transparent, key: const PageStorageKey<String>('简介'),
child: CustomScrollView( controller: needRelated ? _introController : null,
key: const PageStorageKey<String>('简介'), slivers: [
controller: needRelated ? _introController : null, if (videoDetailController.videoType == SearchType.video) ...[
slivers: [ VideoIntroPanel(
if (videoDetailController.videoType == SearchType.video) ...[ heroTag: heroTag,
VideoIntroPanel( showAiBottomSheet: showAiBottomSheet,
showIntroDetail: showIntroDetail,
showEpisodes: showEpisodes,
onShowMemberPage: onShowMemberPage,
),
if (needRelated && videoDetailController.showRelatedVideo) ...[
SliverToBoxAdapter(
child: Padding(
padding: const EdgeInsets.only(top: StyleString.safeSpace),
child: Divider(
height: 1,
indent: 12,
endIndent: 12,
color: Theme.of(context)
.colorScheme
.outline
.withOpacity(0.08),
),
),
),
RelatedVideoPanel(key: relatedVideoPanelKey, heroTag: heroTag),
] else
SliverToBoxAdapter(
child: SizedBox(
height: MediaQuery.paddingOf(context).bottom +
StyleString.safeSpace,
),
),
] else if (videoDetailController.videoType ==
SearchType.media_bangumi)
Obx(
() => BangumiIntroPanel(
heroTag: heroTag, heroTag: heroTag,
showAiBottomSheet: showAiBottomSheet, cid: videoDetailController.cid.value,
showIntroDetail: showIntroDetail,
showEpisodes: showEpisodes, showEpisodes: showEpisodes,
onShowMemberPage: onShowMemberPage, showIntroDetail: showIntroDetail,
), ),
if (needRelated && videoDetailController.showRelatedVideo) ...[ ),
SliverToBoxAdapter( SliverToBoxAdapter(
child: Padding( child: SizedBox(
padding: height: MediaQuery.paddingOf(context).bottom +
const EdgeInsets.only(top: StyleString.safeSpace), (videoDetailController.isPlayAll &&
child: Divider( MediaQuery.orientationOf(context) ==
height: 1, Orientation.landscape
indent: 12, ? 75
endIndent: 12, : 0),
color: Theme.of(context) ),
.colorScheme )
.outline ],
.withOpacity(0.08),
),
),
),
RelatedVideoPanel(
key: relatedVideoPanelKey, heroTag: heroTag),
] else
SliverToBoxAdapter(
child: SizedBox(
height: MediaQuery.paddingOf(context).bottom +
StyleString.safeSpace,
),
),
] else if (videoDetailController.videoType ==
SearchType.media_bangumi)
Obx(
() => BangumiIntroPanel(
heroTag: heroTag,
cid: videoDetailController.cid.value,
showEpisodes: showEpisodes,
showIntroDetail: showIntroDetail,
),
),
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,322 +613,306 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
} }
} }
Widget get childWhenDisabled => SafeArea( Widget get childWhenDisabled => Scaffold(
top: !removeSafeArea && resizeToAvoidBottomInset: false,
MediaQuery.of(context).orientation == Orientation.portrait && key: videoDetailController.scaffoldKey,
isFullScreen, // backgroundColor: Colors.black,
bottom: !removeSafeArea && appBar: PreferredSize(
MediaQuery.of(context).orientation == Orientation.portrait && preferredSize: Size.fromHeight(0),
isFullScreen, child: Stack(
left: false, //!isFullScreen, children: [
right: false, //!isFullScreen, AppBar(
child: Scaffold( backgroundColor: Colors.black,
resizeToAvoidBottomInset: false, toolbarHeight: 0,
key: videoDetailController.scaffoldKey, ),
// backgroundColor: Colors.black, if (videoDetailController.scrollRatio.value != 0 &&
appBar: removeSafeArea videoDetailController.scrollCtr.offset != 0 &&
? null context.orientation == Orientation.portrait)
: PreferredSize( AppBar(
preferredSize: Size.fromHeight(0), backgroundColor: Theme.of(context)
child: Obx( .colorScheme
() => Stack( .surface
children: [ .withOpacity(videoDetailController.scrollRatio.value),
AppBar( toolbarHeight: 0,
backgroundColor: Colors.black,
toolbarHeight: 0,
),
if (videoDetailController.scrollRatio.value != 0 &&
videoDetailController.scrollCtr.offset != 0 &&
context.orientation == Orientation.portrait)
AppBar(
backgroundColor: Theme.of(context)
.colorScheme
.surface
.withOpacity(
videoDetailController.scrollRatio.value),
toolbarHeight: 0,
),
],
),
),
), ),
body: ExtendedNestedScrollView( ],
key: videoDetailController.scrollKey, ),
physics: const NeverScrollableScrollPhysics( ),
parent: ClampingScrollPhysics(), body: ExtendedNestedScrollView(
), key: videoDetailController.scrollKey,
controller: videoDetailController.scrollCtr, physics: const NeverScrollableScrollPhysics(
onlyOneScrollInBody: true, parent: ClampingScrollPhysics(),
pinnedHeaderSliverHeightBuilder: () { ),
double height = isFullScreen || controller: videoDetailController.scrollCtr,
context.orientation == Orientation.landscape onlyOneScrollInBody: true,
? MediaQuery.sizeOf(context).height pinnedHeaderSliverHeightBuilder: () {
: videoDetailController.isExpanding || double height =
videoDetailController.isCollapsing isFullScreen || context.orientation == Orientation.landscape
? animHeight ? MediaQuery.sizeOf(context).height
: videoDetailController.isCollapsing || : videoDetailController.isExpanding ||
plPlayerController?.playerStatus.status.value == videoDetailController.isCollapsing
PlayerStatus.playing ? animHeight
? videoDetailController.minVideoHeight : videoDetailController.isCollapsing ||
: kToolbarHeight; plPlayerController?.playerStatus.status.value ==
if (videoDetailController.isExpanding && PlayerStatus.playing
videoDetailController.animationController.value == 1) { ? videoDetailController.minVideoHeight
videoDetailController.isExpanding = false; : kToolbarHeight;
WidgetsBinding.instance.addPostFrameCallback((_) { if (videoDetailController.isExpanding &&
videoDetailController.scrollRatio.value = 0; videoDetailController.animationController.value == 1) {
refreshPage(); videoDetailController.isExpanding = false;
}); WidgetsBinding.instance.addPostFrameCallback((_) {
} else if (videoDetailController.isCollapsing && videoDetailController.scrollRatio.value = 0;
videoDetailController.animationController.value == 1) { refreshPage();
videoDetailController.isCollapsing = false; });
WidgetsBinding.instance.addPostFrameCallback((_) { } else if (videoDetailController.isCollapsing &&
refreshPage(); videoDetailController.animationController.value == 1) {
}); videoDetailController.isCollapsing = false;
} WidgetsBinding.instance.addPostFrameCallback((_) {
return height; refreshPage();
}, });
headerSliverBuilder: }
(BuildContext context, bool innerBoxIsScrolled) { return height;
return [ },
SliverAppBar( headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) {
automaticallyImplyLeading: false, return [
pinned: true, SliverAppBar(
expandedHeight: isFullScreen || automaticallyImplyLeading: false,
context.orientation == Orientation.landscape pinned: true,
? MediaQuery.sizeOf(context).height expandedHeight:
: videoDetailController.isExpanding || isFullScreen || context.orientation == Orientation.landscape
videoDetailController.isCollapsing ? MediaQuery.sizeOf(context).height
? animHeight : videoDetailController.isExpanding ||
: videoDetailController.videoHeight, videoDetailController.isCollapsing
flexibleSpace: Stack( ? animHeight
children: [ : videoDetailController.videoHeight,
Obx( flexibleSpace: Stack(
() { children: [
final double videoWidth = context.width; Obx(
if (MediaQuery.of(context).orientation == () {
Orientation.landscape && final double videoWidth = context.width;
!horizontalScreen && if (MediaQuery.of(context).orientation ==
!isFullScreen && Orientation.landscape &&
isShowing && !horizontalScreen &&
mounted) { !isFullScreen &&
hideStatusBar(); isShowing &&
mounted) {
hideStatusBar();
}
if (MediaQuery.of(context).orientation ==
Orientation.portrait &&
!isFullScreen &&
isShowing &&
mounted) {
if (videoDetailController.imageStatus.not &&
removeSafeArea.not) {
showStatusBar();
} }
if (MediaQuery.of(context).orientation == }
Orientation.portrait && if (removeSafeArea &&
!isFullScreen && isFullScreen &&
isShowing && videoDetailController.direction.value ==
mounted) { 'vertical') {
if (videoDetailController.imageStatus.not && WidgetsBinding.instance.addPostFrameCallback((_) {
removeSafeArea.not) { refreshPage();
showStatusBar(); });
} }
} return Container(
if (removeSafeArea && color: Colors.black,
isFullScreen && // showStatusBarBackgroundColor ? null : Colors.black,
videoDetailController.direction.value == height: MediaQuery.of(context).orientation ==
'vertical') { Orientation.landscape ||
WidgetsBinding.instance.addPostFrameCallback((_) { isFullScreen
refreshPage(); ? MediaQuery.sizeOf(context).height -
}); (MediaQuery.of(context).orientation ==
} Orientation.landscape ||
return Container( removeSafeArea
color: Colors.black, ? 0
// showStatusBarBackgroundColor ? null : Colors.black, : MediaQuery.of(context).padding.top)
height: MediaQuery.of(context).orientation == : videoDetailController.isExpanding ||
Orientation.landscape || videoDetailController.isCollapsing
isFullScreen ? animHeight
? MediaQuery.sizeOf(context).height - : videoDetailController.videoHeight,
(MediaQuery.of(context).orientation == width: context.width,
Orientation.landscape || child: PopScope(
removeSafeArea canPop: !isFullScreen &&
? 0 (horizontalScreen ||
: MediaQuery.of(context).padding.top) MediaQuery.of(context).orientation ==
: videoDetailController.isExpanding || Orientation.portrait),
videoDetailController.isCollapsing onPopInvokedWithResult: _onPopInvokedWithResult,
? animHeight child: videoPlayer(
: videoDetailController.videoHeight, videoWidth,
width: context.width, context.orientation == Orientation.landscape ||
child: PopScope( isFullScreen
canPop: !isFullScreen && ? context.height
(horizontalScreen || : videoDetailController.isExpanding ||
MediaQuery.of(context).orientation == videoDetailController.isCollapsing
Orientation.portrait), ? animHeight
onPopInvokedWithResult: _onPopInvokedWithResult, : videoDetailController.videoHeight,
child: videoPlayer(
videoWidth,
context.orientation == Orientation.landscape ||
isFullScreen
? context.height
: videoDetailController.isExpanding ||
videoDetailController.isCollapsing
? animHeight
: videoDetailController.videoHeight,
),
), ),
); ),
}, );
), },
Obx( ),
() { Obx(
Widget toolbar() => Opacity( () {
opacity: Widget toolbar() => Opacity(
videoDetailController.scrollRatio.value, opacity: videoDetailController.scrollRatio.value,
child: Container( child: Container(
color: Theme.of(context).colorScheme.surface, color: Theme.of(context).colorScheme.surface,
alignment: Alignment.topCenter, alignment: Alignment.topCenter,
child: SizedBox( child: SizedBox(
height: kToolbarHeight, height: kToolbarHeight,
child: Stack( child: Stack(
children: [ children: [
Align( Align(
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
child: Row( child: Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
SizedBox( SizedBox(
width: 42, width: 42,
height: 34, height: 34,
child: IconButton( child: IconButton(
tooltip: '返回', tooltip: '返回',
icon: Icon( icon: Icon(
FontAwesomeIcons.arrowLeft, FontAwesomeIcons.arrowLeft,
size: 15, size: 15,
color: Theme.of(context) color: Theme.of(context)
.colorScheme .colorScheme
.onSurface, .onSurface,
),
onPressed: Get.back,
), ),
onPressed: Get.back,
), ),
SizedBox( ),
width: 42, SizedBox(
height: 34, width: 42,
child: IconButton( height: 34,
tooltip: '返回主页', child: IconButton(
icon: Icon( tooltip: '返回主页',
FontAwesomeIcons.house, icon: Icon(
size: 15, FontAwesomeIcons.house,
color: Theme.of(context) size: 15,
.colorScheme color: Theme.of(context)
.onSurface, .colorScheme
), .onSurface,
onPressed: () {
Get.until((route) =>
route.isFirst);
},
), ),
onPressed: () {
Get.until(
(route) => route.isFirst);
},
), ),
], ),
), ],
), ),
Center( ),
child: Row( Center(
mainAxisSize: MainAxisSize.min, child: Row(
children: [ mainAxisSize: MainAxisSize.min,
Icon( children: [
Icons.play_arrow_rounded, Icon(
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 || return videoDetailController.scrollRatio.value == 0 ||
context.orientation != Orientation.portrait videoDetailController.scrollCtr.offset == 0 ||
? const SizedBox.shrink() context.orientation != Orientation.portrait ||
: Positioned.fill( plPlayerController?.playerStatus.status.value ==
bottom: -2, PlayerStatus.playing
child: GestureDetector( ? const SizedBox.shrink()
onTap: () async { : Positioned.fill(
if (videoDetailController.isQuerying) { bottom: -2,
debugPrint('handlePlay: querying'); child: GestureDetector(
return; onTap: () async {
} if (videoDetailController.isQuerying) {
if (videoDetailController.videoUrl == debugPrint('handlePlay: querying');
null || return;
videoDetailController.audioUrl == }
null) { if (videoDetailController.videoUrl ==
debugPrint( null ||
'handlePlay: videoUrl/audioUrl not initialized'); videoDetailController.audioUrl ==
videoDetailController.queryVideoUrl(); null) {
return; debugPrint(
} 'handlePlay: videoUrl/audioUrl not initialized');
videoDetailController.scrollRatio.value = videoDetailController.queryVideoUrl();
0; return;
if (plPlayerController == null || }
videoDetailController.playedTime == videoDetailController.scrollRatio.value = 0;
null) { if (plPlayerController == null ||
handlePlay(); videoDetailController.playedTime ==
} else { null) {
if (plPlayerController! handlePlay();
} else {
if (plPlayerController!
.videoPlayerController!
.state
.completed) {
await plPlayerController!
.videoPlayerController! .videoPlayerController!
.state .seek(Duration.zero);
.completed) { plPlayerController!
await plPlayerController! .videoPlayerController!
.videoPlayerController! .play();
.seek(Duration.zero); } else {
plPlayerController! plPlayerController!
.videoPlayerController! .videoPlayerController!
.play(); .playOrPause();
} else {
plPlayerController!
.videoPlayerController!
.playOrPause();
}
} }
}, }
behavior: HitTestBehavior.opaque, },
child: toolbar(), 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,
], ],
), ),
), ),
]; ],
},
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,
],
),
),
],
),
), ),
), ),
), ),
@@ -1177,16 +1161,13 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
if (videoDetailController.videoType == if (videoDetailController.videoType ==
SearchType.video && SearchType.video &&
videoDetailController.showRelatedVideo) videoDetailController.showRelatedVideo)
Material( CustomScrollView(
color: Colors.transparent, controller: _introController,
child: CustomScrollView( slivers: [
controller: _introController, RelatedVideoPanel(
slivers: [ key: relatedVideoPanelKey,
RelatedVideoPanel( heroTag: heroTag),
key: relatedVideoPanelKey, ],
heroTag: heroTag),
],
),
), ),
if (videoDetailController.showReply) if (videoDetailController.showReply)
videoReplyPanel(), videoReplyPanel(),