Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work on iOS #6

Closed
besserwisser opened this issue Aug 7, 2019 · 7 comments
Closed

Does not work on iOS #6

besserwisser opened this issue Aug 7, 2019 · 7 comments

Comments

@besserwisser
Copy link

I tested it on an iPad (iOS 12.3.1) and it had no effect. Not in my app and not with the example app.

Screen rotation is allowed in iOS.

Here a screen recording of the example app: https://streamable.com/vve0p

@sfaujour
Copy link

Hey @besserwisser
thats no a problem with iOS, it's a problem with iPad's in general, which is an offical flutter issue.

@sfaujour
Copy link

sfaujour commented Aug 10, 2019

flutter/flutter#27235

@anilslabs
Copy link

App crashing on iPhone 6

@SinoMiles
Copy link

@besserwisser @sfaujour did you fix the problem? I'm using iPad too.

@besserwisser
Copy link
Author

@besserwisser @sfaujour did you fix the problem? I'm using iPad too.

Nope, I did not fix it. You have to manually rotate the iPad.

@lishuu
Copy link

lishuu commented Mar 9, 2020

Same problem i encountered.

  • iPhoneX
  • iOS 13.3.1

@SinoMiles
Copy link

SinoMiles commented Mar 20, 2020

@besserwisser @sfaujour
I has fix this problem.just select full screen,that can lock screen.
my ipad version is 12.0 .ipad simulator is 13.3

setPreferredOrientations method
Future setPreferredOrientations (
List orientations
)
Specifies the set of orientations the application interface can be displayed in.

The orientation argument is a list of DeviceOrientation enum values. The empty list causes the application to defer to the operating system default.

Limitations
This setting will only be respected on iPad if multitasking is disabled.

You can decide to opt out of multitasking on iPad, then setPreferredOrientations will work but your app will not support Slide Over and Split View multitasking anymore.

Should you decide to opt out of multitasking you can do this by setting "Requires full screen" to true in the Xcode Deployment Info.
code here

void main() async {
  AutoOrientation.landscapeLeftMode();
  runApp( MyApp());
}

image

@fbatschi fbatschi closed this as completed May 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants