orientation property
DeviceOrientation
get
orientation
Accelerometer-driven physical device rotation; updates regardless of OS auto-rotate or app UI orientation lock.
Implementation
static DeviceOrientation get orientation {
final idx = _uxDeviceOrientation?.call() ?? 0;
if (idx < 0 || idx >= DeviceOrientation.values.length) {
return DeviceOrientation.portraitUp;
}
return DeviceOrientation.values[idx];
}