Commit 8b9e144e authored by Josh's avatar Josh Committed by Michael Goderbauer

Added notice to docs that setPreferredOrientations does not always work on iPad (#40743)

parent f8310d89
...@@ -221,6 +221,17 @@ class SystemChrome { ...@@ -221,6 +221,17 @@ class SystemChrome {
/// The `orientation` argument is a list of [DeviceOrientation] enum values. /// The `orientation` argument is a list of [DeviceOrientation] enum values.
/// The empty list causes the application to defer to the operating system /// The empty list causes the application to defer to the operating system
/// default. /// 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<void> setPreferredOrientations(List<DeviceOrientation> orientations) async { static Future<void> setPreferredOrientations(List<DeviceOrientation> orientations) async {
await SystemChannels.platform.invokeMethod<void>( await SystemChannels.platform.invokeMethod<void>(
'SystemChrome.setPreferredOrientations', 'SystemChrome.setPreferredOrientations',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment