fromValue static method
Implementation
static DeviceOrientation fromValue(String type) {
return values.firstWhere((element) {
if (Platform.isAndroid) {
return element.androidValue == type;
} else if (Platform.isIOS) {
return element.iOSValue == type;
}
return false;
}, orElse: () => DeviceOrientation.portrait);
}