From 3a4816543d24ee4d05ca3f352894f9e9d5feee76 Mon Sep 17 00:00:00 2001 From: orz12 Date: Sun, 18 Feb 2024 16:21:52 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=B0=9D=E8=AF=95=E9=80=9A=E8=BF=87?= =?UTF-8?q?=E5=88=86=E7=A6=BBOrientationBuilder=E4=BB=A5=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E4=BD=8E=E7=89=88=E6=9C=AC=E5=AE=89=E5=8D=93=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E5=85=A8=E5=B1=8F=E6=97=8B=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/video/detail/view.dart | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/pages/video/detail/view.dart b/lib/pages/video/detail/view.dart index 203f147a2..a1784fb23 100644 --- a/lib/pages/video/detail/view.dart +++ b/lib/pages/video/detail/view.dart @@ -822,6 +822,16 @@ class _VideoDetailPageState extends State } }, ); + if (!horizontalScreen) { + if (Platform.isAndroid) { + return PiPSwitcher( + childWhenDisabled: childWhenDisabled, + childWhenEnabled: childWhenEnabled, + floating: floating, + ); + } + return childWhenDisabled; + } return OrientationBuilder( builder: (BuildContext context, Orientation orientation) { if (orientation == Orientation.landscape) { @@ -831,7 +841,7 @@ class _VideoDetailPageState extends State return PiPSwitcher( childWhenDisabled: Container( key: UniqueKey(), - child: !horizontalScreen || orientation == Orientation.portrait + child: orientation == Orientation.portrait ? childWhenDisabled : childWhenDisabledLandscape, ), @@ -841,7 +851,7 @@ class _VideoDetailPageState extends State } return Container( key: UniqueKey(), - child: !horizontalScreen || orientation == Orientation.portrait + child: orientation == Orientation.portrait ? childWhenDisabled : childWhenDisabledLandscape, );