fromNativeValue static method

URLRequestNetworkServiceType? fromNativeValue(
  1. int? value
)

Gets a possible URLRequestNetworkServiceType instance from a native value.

Implementation

static URLRequestNetworkServiceType? fromNativeValue(int? value) {
  if (value != null) {
    try {
      return URLRequestNetworkServiceType.values.firstWhere(
        (element) => element.toNativeValue() == value,
      );
    } catch (e) {
      return null;
    }
  }
  return null;
}