opt: showEpisodes

This commit is contained in:
bggRGjQaUbCoE
2024-09-20 19:48:40 +08:00
parent 511c9be62a
commit 1392f35393
2 changed files with 15 additions and 9 deletions

View File

@@ -526,6 +526,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
playerController: plPlayerController!, playerController: plPlayerController!,
), ),
), ),
showEpisodes: showEpisodes,
), ),
); );
} else { } else {
@@ -1365,6 +1366,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
playerController: plPlayerController!, playerController: plPlayerController!,
), ),
), ),
showEpisodes: showEpisodes,
), ),
); );
Widget autoChoose(Widget childWhenDisabled) { Widget autoChoose(Widget childWhenDisabled) {
@@ -1480,7 +1482,9 @@ class _VideoDetailPageState extends State<VideoDetailPage>
currentCid: cid, currentCid: cid,
changeFucCall: videoIntroController.changeSeasonOrbangu, changeFucCall: videoIntroController.changeSeasonOrbangu,
context: context, context: context,
scaffoldState: scaffoldKey.currentState, scaffoldState: isFullScreen.value
? videoDetailController.scaffoldKey.currentState
: scaffoldKey.currentState,
).buildShowBottomSheet(); ).buildShowBottomSheet();
} }
} }

View File

@@ -48,6 +48,7 @@ class PLVideoPlayer extends StatefulWidget {
this.bottomList, this.bottomList,
this.customWidget, this.customWidget,
this.customWidgets, this.customWidgets,
this.showEpisodes,
super.key, super.key,
}); });
@@ -62,6 +63,7 @@ class PLVideoPlayer extends StatefulWidget {
final Widget? customWidget; final Widget? customWidget;
final List<Widget>? customWidgets; final List<Widget>? customWidgets;
final Function? showEpisodes;
@override @override
State<PLVideoPlayer> createState() => _PLVideoPlayerState(); State<PLVideoPlayer> createState() => _PLVideoPlayerState();
@@ -363,14 +365,14 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
.episodes!); .episodes!);
changeFucCall = bangumiIntroController!.changeSeasonOrbangu; changeFucCall = bangumiIntroController!.changeSeasonOrbangu;
} }
ListSheet( if (widget.showEpisodes != null) {
episodes: episodes, widget.showEpisodes!(
bvid: bvid, episodes,
aid: IdUtils.bv2av(bvid), bvid,
currentCid: currentCid, IdUtils.bv2av(bvid),
changeFucCall: changeFucCall, currentCid,
context: context, );
).buildShowBottomSheet(); }
}, },
), ),
), ),