fromNativeValue static method

ReferrerPolicy? fromNativeValue(
  1. String? value
)

Gets a possible ReferrerPolicy instance from a native value.

Implementation

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