Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to enable upside down orientation on flutter for iOS?

I am trying to enable upside-down portrait mode on flutter app for ios. All orienations are enabled in the app:

SystemChrome.setPreferredOrientations([
      DeviceOrientation.portraitUp,
      DeviceOrientation.portraitDown,
      DeviceOrientation.landscapeRight,
      DeviceOrientation.landscapeLeft,
    ]);

All the orientation are also enabled on ios project settings through Xcode:

<key>UISupportedInterfaceOrientations</key>
    <array>
        <string>UIInterfaceOrientationPortrait</string>
        <string>UIInterfaceOrientationLandscapeRight</string>
        <string>UIInterfaceOrientationPortraitUpsideDown</string>
        <string>UIInterfaceOrientationLandscapeLeft</string>
    </array>

For some reason on iOS upside-down portrait mode is not working.
Any ideas on what might be wrong is highly appreciated

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Apple doc

All iPadOS devices support the portraitUpsideDown orientation. It’s
best practice to enable it for the iPad idiom. iOS devices without a
Home button, such as iPhone 12, don’t support this orientation. You
should disable it entirely for the iPhone idiom.

Do you test this feature on a proper ios device?

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading