From 8b9e144e6a1ec9623ee3d099504d99374b199852 Mon Sep 17 00:00:00 2001 From: Josh <1541038+josh-ksr@users.noreply.github.com> Date: Thu, 3 Oct 2019 00:32:52 +0200 Subject: [PATCH] Added notice to docs that setPreferredOrientations does not always work on iPad (#40743) --- packages/flutter/lib/src/services/system_chrome.dart | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/flutter/lib/src/services/system_chrome.dart b/packages/flutter/lib/src/services/system_chrome.dart index eed220552b..059c526518 100644 --- a/packages/flutter/lib/src/services/system_chrome.dart +++ b/packages/flutter/lib/src/services/system_chrome.dart @@ -221,6 +221,17 @@ class SystemChrome { /// The `orientation` argument is a list of [DeviceOrientation] enum values. /// The empty list causes the application to defer to the operating system /// default. + /// + /// ## Limitations + /// + /// This setting will only be respected on iPad if multitasking is disabled. + /// + /// You can decide to opt out of multitasking on iPad, then + /// setPreferredOrientations will work but your app will not + /// support Slide Over and Split View multitasking anymore. + /// + /// Should you decide to opt out of multitasking you can do this by + /// setting "Requires full screen" to true in the Xcode Deployment Info. static Future setPreferredOrientations(List orientations) async { await SystemChannels.platform.invokeMethod( 'SystemChrome.setPreferredOrientations',