bytepark / auto_orientation

A flutter plugin to programmatically change the orientation and rotate
MIT License
46 stars 45 forks source link

v2.3.0 iOS15 has flushed back. #32

Open yisar opened 1 year ago

yisar commented 1 year ago

the new version does not work well at ios15

    try {
      SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, overlays: []);
      AutoOrientation.landscapeRightMode();
    } catch (e) {
      showErrorSnackBar(e.toString());
    }
fbatschi commented 1 year ago

can confirm. for now stay with 2.2.1 if you support ios15.

yisar commented 1 year ago

But I need to support both iOS 15 and 16,16, which is more important, but currently the error of 15 is destructive. Is there a way to use both versions simultaneously.

BlackLeg15 commented 1 year ago

I mean, I may be wrong but this code's always going to throw, right? Because of this guy 👇 image

yisar commented 1 year ago

I mean, I may be wrong but this code's always going to throw, right? Because of this guy 👇

Please test iOS15 and the latest version of flutter, at present, not only iOS15 is destructive, iOS16 still has a method that has no effect, I have to write my own native plugin to do landscape screen, I don't think there is any difficulty here, just insufficient testing.

fbatschi commented 1 year ago

@yisar you are free to fork, write your own code, submit pull requests or do whatever you want.

There was a rawValue call missing in the legacy code of UIDevice.current.setValue. Fix has been pushed to master, so feel free to use that. A new package will be published shortly.