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.
This commit is contained in:
ash2moon 2025-03-13 10:26:32 -07:00 committed by GitHub
parent 627f1d200b
commit 0aa0ad160e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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