-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Closed
flutter/engine
#36253Labels
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 Issuesc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.platform-webWeb applications specificallyWeb applications specifically
Description
Setting the preferred device orientation with SystemChrome.setPreferredOrientations on Web should map:
DeviceOrientation.landscapeLefttolandscape-primaryorientation lock type (rather thanportrait-secondary)DeviceOrientation.portraitDowntoportrait-secondaryorientation lock type (rather thanlandscape-primary)
Current device orientation to orientation lock type mapping (here):
switch (deviceOrientation) {
case 'DeviceOrientation.portraitUp':
return orientationLockTypePortraitPrimary;
case 'DeviceOrientation.landscapeLeft':
return orientationLockTypePortraitSecondary;
case 'DeviceOrientation.portraitDown':
return orientationLockTypeLandscapePrimary;
case 'DeviceOrientation.landscapeRight':
return orientationLockTypeLandscapeSecondary;
default:
return null;
}Proposed device orientation to orientation lock type mapping:
switch (deviceOrientation) {
case 'DeviceOrientation.portraitUp':
return orientationLockTypePortraitPrimary;
case 'DeviceOrientation.landscapeLeft':
return orientationLockTypeLandscapePrimary;
case 'DeviceOrientation.portraitDown':
return orientationLockTypePortraitSecondary;
case 'DeviceOrientation.landscapeRight':
return orientationLockTypeLandscapeSecondary;
default:
return null;
}TimWhiting
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 Issuesc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.platform-webWeb applications specificallyWeb applications specifically