fromValue static method

Implementation

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