fluttercommunity / fluttercommunity/plus_plugins

[Request]: Expose device orientation events

Open
#1,032 3 comments 8 reactions 0 assignees View on GitHub
enhancement Hacktoberfest triage
Dominant language
Dart
Stars
1.9k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

### Plugin

sensors_plus

### Use case

Device orientation (in world coordinates) is often desired and seems to be implemented for android/ios/web under [TYPE_ORIENTATION_VECTOR](https://google-developer-training.github.io/android-developer-advanced-course-concepts/unit-1-expand-the-user-experience/lesson-3-sensors/3-2-c-motion-and-position-sensors/3-2-c-motion-and-position-sensors.html#devicerotation), [CMQuaternion](https://developer.apple.com/documentation/coremotion/cmattitude/1616025-quaternion) and [onDeviceOrientation](https://api.dart.dev/be/136904/dart-html/Window/onDeviceOrientation.html) respectively.

My understanding is these use non-trivial sensor fusion algorithms that are more sophisticated than simply integrating gyroscope measurements.

Related to #764

### Proposal

Expose a `Stream orientationEvents`.

If it will be considered for acceptance, I could hack up a PR based on other stream implementations, though my experience with android/ios is non-existent.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.