orientation static method
Implementation
static NativeDeviceOrientation orientation(BuildContext context) {
final inheritedNativeOrientation = context.dependOnInheritedWidgetOfExactType<_InheritedNativeDeviceOrientation>();
assert(() {
if (inheritedNativeOrientation == null) {
throw FlutterError('DeviceOrientationListener.orientation was called but there'
' is no DeviceOrientationListener in the context.');
}
return true;
}());
return inheritedNativeOrientation!.nativeOrientation;
}