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

@@ -542,6 +542,9 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
super.didChangeDependencies();
VideoDetailPageV.routeObserver
.subscribe(this, ModalRoute.of(context)! as PageRoute);
themeData = videoDetailController.plPlayerController.darkVideoPage
? MyApp.darkThemeData ?? Theme.of(context)
: Theme.of(context);
}
// void _handleTransition(String name) {
@@ -1510,10 +1513,7 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
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) {
@@ -1730,7 +1730,9 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
Widget videoPlayer(double videoWidth, double videoHeight) {
return PopScope(
canPop: !isFullScreen,
canPop: !isFullScreen &&
(horizontalScreen ||
MediaQuery.of(context).orientation == Orientation.portrait),
onPopInvokedWithResult: _onPopInvokedWithResult,
child: Stack(
children: [