fromValue static method

IOSUIModalPresentationStyle? fromValue(
  1. int? value
)

Gets a possible IOSUIModalPresentationStyle instance from int value.

Implementation

static IOSUIModalPresentationStyle? fromValue(int? value) {
  if (value != null) {
    try {
      return IOSUIModalPresentationStyle.values
          .firstWhere((element) => element.toValue() == value);
    } catch (e) {
      return null;
    }
  }
  return null;
}