From 42e200d9e79b22cf0d422a54ab7c6f1d7d523e9d Mon Sep 17 00:00:00 2001 From: Z <> Date: Wed, 10 Jan 2024 15:29:24 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9C=A8=20iOS=20?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E4=B8=AD=E9=99=A4=E7=AC=AC=E4=B8=80=E6=AC=A1?= =?UTF-8?q?=E5=85=A8=E5=B1=8F=E5=A4=96=EF=BC=8C=E5=90=8E=E7=BB=AD=E5=85=A8?= =?UTF-8?q?=E5=B1=8F=E4=BC=9A=E6=97=8B=E8=BD=AC=E4=B8=A4=E6=AC=A1=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/core/fijkplugin.dart | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/core/fijkplugin.dart b/lib/core/fijkplugin.dart index 9d0d8ace..6ae882a4 100644 --- a/lib/core/fijkplugin.dart +++ b/lib/core/fijkplugin.dart @@ -67,8 +67,11 @@ class FijkPlugin { static Future setOrientationLandscape() async { if (isDesktop()) return Future.value(false); bool? changed = await _channel.invokeMethod("setOrientationLandscape"); - SystemChrome.setPreferredOrientations( - [DeviceOrientation.landscapeRight, DeviceOrientation.landscapeLeft]); + var orientation = DeviceOrientation.landscapeRight; + if (Platform.isAndroid) { + orientation = DeviceOrientation.landscapeLeft; + } + SystemChrome.setPreferredOrientations([orientation]); return Future.value(changed); } From be1238f9299aff91e2300182457f6bcdf04a77dc Mon Sep 17 00:00:00 2001 From: Z <> Date: Wed, 10 Jan 2024 15:31:27 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20iOS=20demo=20=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E8=BF=90=E8=A1=8C=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/ios/Runner.xcodeproj/project.pbxproj | 3 --- 1 file changed, 3 deletions(-) diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj index 665183ce..b1616f64 100644 --- a/example/ios/Runner.xcodeproj/project.pbxproj +++ b/example/ios/Runner.xcodeproj/project.pbxproj @@ -373,7 +373,6 @@ "-ObjC", "-l\"bz2\"", "-l\"fijkplayer\"", - "-l\"shared_preferences\"", "-l\"stdc++\"", "-l\"z\"", "-framework", @@ -542,7 +541,6 @@ "-ObjC", "-l\"bz2\"", "-l\"fijkplayer\"", - "-l\"shared_preferences\"", "-l\"stdc++\"", "-l\"z\"", "-framework", @@ -607,7 +605,6 @@ "-ObjC", "-l\"bz2\"", "-l\"fijkplayer\"", - "-l\"shared_preferences\"", "-l\"stdc++\"", "-l\"z\"", "-framework",