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

This commit is contained in:
Josh
2019-10-03 00:32:52 +02:00
committed by Michael Goderbauer
parent f8310d89e8
commit 8b9e144e6a

View File

@@ -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<void> setPreferredOrientations(List<DeviceOrientation> orientations) async {
await SystemChannels.platform.invokeMethod<void>(
'SystemChrome.setPreferredOrientations',