Closed
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
High-priority issues at the top of the work listSystemChrome and Framework's Layout Issuesflutter/engine repository. See also e: labels.Found to occur in 3.3Found to occur in 3.7The issue has been confirmed reproducible and is ready to work oniOS applications specificallyIssue is closed as already fixed in a newer version