From 0aa0ad160ed2a260b7c788fe730d94b947f80968 Mon Sep 17 00:00:00 2001 From: ash2moon Date: Thu, 13 Mar 2025 10:26:32 -0700 Subject: [PATCH] add docs on android limitation for screen orientations (#165021) Resolves https://github.com/flutter/flutter/issues/99149 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. --- .../flutter/lib/src/services/system_chrome.dart | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/packages/flutter/lib/src/services/system_chrome.dart b/packages/flutter/lib/src/services/system_chrome.dart index bc3c4050fa..e6fd15ee80 100644 --- a/packages/flutter/lib/src/services/system_chrome.dart +++ b/packages/flutter/lib/src/services/system_chrome.dart @@ -411,6 +411,20 @@ abstract final class SystemChrome { /// /// ### Android /// + /// Android limits the [orientations](https://developer.android.com/reference/android/R.attr#screenOrientation) + /// to the following combinations: + /// + /// - None (empty) - Corresponds to unspecified + /// - portraitUp - Corresponds to portrait + /// - landscapeLeft - Corresponds to landscape + /// - portraitDown - Corresponds to reversePortrait + /// - portraitUp, portraitDown - Corresponds to userPortrait + /// - landscapeRight - Corresponds to reverseLandscape + /// - landscapeLeft, landscapeRight - Corresponds to userLandscape + /// - portraitUp, landscapeLeft, landscapeRight - Corresponds to user + /// - portraitUp, portraitDown, landscapeLeft, landscapeRight - Corresponds + /// to fullUser + /// /// Android screens may choose to [letterbox](https://developer.android.com/guide/practices/enhanced-letterboxing) /// applications that lock orientation, particularly on larger screens. When /// letterboxing occurs on Android, the [MediaQueryData.size] reports the