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

Support for detecting portrait lock orientation #52

Open
JacobSchantz opened this issue Nov 21, 2022 · 3 comments
Open

Support for detecting portrait lock orientation #52

JacobSchantz opened this issue Nov 21, 2022 · 3 comments

Comments

@JacobSchantz
Copy link

Love the package! We've used it to develop a video player and it works like a charm! I think the only thing this package lacks is the ability to detect if the user has portrait orientation lock on or off. This would really complete the package and allow us to show content to users in a much more attractive way, while also respecting their preferences. Users of this package could implement beautiful custom rotation animations to individual widgets, instead of the glitchy-looking default rotation behavior when using systemChrome.

@caleb654
Copy link

Yes this is definitely needed!

@UlasKasim-dusyeri
Copy link

https://pub.dev/packages/auto_rotate_get package supports portrait lock orientation listener but only Android side. iOS side doesn't work. It would be huge if this package provides a solution for it

@Andrewngabriel
Copy link

I just created rotation_check which provides a simple API to check whether auto-rotate is turned on or off. The current release works on Android and has a no-op implementation for iOS due to limitations with iOS not providing any public APIs to determine portrait lock mode status.

I've come across some discussions across stackoverflow and forums which give some insight into the possibility of determining whether portrait mode is on/off through accelerometer and gyroscope sensor data. I'm still experimenting with using this approach but I have concerns that it's likely to produce flaky results that are not deterministic in all scenarios.

If someone has ideas or workarounds, I'm all ears!

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

4 participants