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", 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); }