deviceOrientation$ top-level property
Absolute device orientation stream.
It's not dependent on current app rotation mode rather reflects physical device orientation.
Emits only changes in orientation, no two identical orientation readings will ever be emitted.
On devices that does not support sensors it will default to DeviceOrientation.portraitUp.
Implementation
Stream<DeviceOrientation> deviceOrientation$ = accelerometerEvents
.map<DeviceOrientation>(_accelerometerEventToDeviceOrientation)
.distinct();