-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
flutter/engine
#38230Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work lista: layoutSystemChrome and Framework's Layout IssuesSystemChrome and Framework's Layout Issuesengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.found in release: 3.3Found to occur in 3.3Found to occur in 3.3found in release: 3.7Found to occur in 3.7Found to occur in 3.7has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onplatform-iosiOS applications specificallyiOS applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version
Description
I have an app that is by design always limited to DeviceOrientation.portraitUp. We don't allow any other orientations except for one screen, which is used as PDF or Image viewer, I want to allow ONLY this view to rotate freely. It works fine on Android but not on iOS.
I have added this in initState:
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp, DeviceOrientation.landscapeRight, DeviceOrientation.landscapeLeft]);
in that case, all good on Android, but no effect on iOS it's like it has only DeviceOrientation.portraitUp
if I do:
if (Platform.isIOS) {
SystemChrome.setPreferredOrientations([DeviceOrientation.landscapeRight, DeviceOrientation.landscapeLeft]);
}
That allows landscape rotations but I cannot do portrait...
Any ideas?
Not mentioned but I do do:
void dispose() {
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
super.dispose();
}
Metadata
Metadata
Assignees
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work lista: layoutSystemChrome and Framework's Layout IssuesSystemChrome and Framework's Layout Issuesengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.found in release: 3.3Found to occur in 3.3Found to occur in 3.3found in release: 3.7Found to occur in 3.7Found to occur in 3.7has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onplatform-iosiOS applications specificallyiOS applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version