fix: video page theme

mod: popscope

related #459

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-03-16 15:33:55 +08:00
parent 7854c5e6b9
commit 57d2d3f5d9
4 changed files with 32 additions and 16 deletions

View File

@@ -503,6 +503,9 @@ class _VideoDetailPageState extends State<VideoDetailPage>
super.didChangeDependencies();
VideoDetailPage.routeObserver
.subscribe(this, ModalRoute.of(context)! as PageRoute);
themeData = videoDetailController.plPlayerController.darkVideoPage
? MyApp.darkThemeData ?? Theme.of(context)
: Theme.of(context);
}
// void _handleTransition(String name) {
@@ -1131,10 +1134,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
return childWhenDisabled;
}
late final ThemeData themeData =
videoDetailController.plPlayerController.darkVideoPage
? MyApp.darkThemeData ?? Theme.of(context)
: Theme.of(context);
late ThemeData themeData;
Widget get child {
if (!horizontalScreen) {
@@ -1345,7 +1345,9 @@ class _VideoDetailPageState extends State<VideoDetailPage>
}
Widget videoPlayer(double videoWidth, double videoHeight) => PopScope(
canPop: !isFullScreen,
canPop: !isFullScreen &&
(horizontalScreen ||
MediaQuery.of(context).orientation == Orientation.portrait),
onPopInvokedWithResult: _onPopInvokedWithResult,
child: Stack(
children: [