fromValue method Null safety

AndroidSslError? fromValue(
  1. int? value
)

Implementation

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