fix video tab

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-07-07 11:57:32 +08:00
parent b43c07bd51
commit 74f7c5d0ea

View File

@@ -1009,29 +1009,27 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
child: videoPlayer(videoWidth, videoHeight), child: videoPlayer(videoWidth, videoHeight),
), ),
Expanded( Expanded(
child: Expanded( child: Scaffold(
child: Scaffold( key: videoDetailController.childKey,
key: videoDetailController.childKey, resizeToAvoidBottomInset: false,
resizeToAvoidBottomInset: false, backgroundColor: Colors.transparent,
backgroundColor: Colors.transparent, body: Column(
body: Column( children: [
children: [ buildTabbar(
buildTabbar( showIntro: false,
showIntro: false, showReply: videoDetailController.showReply,
showReply: videoDetailController.showReply, ),
Expanded(
child: videoTabBarView(
controller: videoDetailController.tabCtr,
children: [
if (videoDetailController.showReply)
videoReplyPanel(),
if (_shouldShowSeasonPanel) seasonPanel,
],
), ),
Expanded( ),
child: videoTabBarView( ],
controller: videoDetailController.tabCtr,
children: [
if (videoDetailController.showReply)
videoReplyPanel(),
if (_shouldShowSeasonPanel) seasonPanel,
],
),
),
],
),
), ),
), ),
), ),
@@ -1428,8 +1426,9 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
videoDetailController.tabCtr = TabController( videoDetailController.tabCtr = TabController(
vsync: this, vsync: this,
length: tabs.length, length: tabs.length,
initialIndex: initialIndex: tabs.isEmpty
videoDetailController.tabCtr.index.clamp(0, tabs.length - 1), ? 0
: videoDetailController.tabCtr.index.clamp(0, tabs.length - 1),
); );
} }