fromNativeValue static method

UserScriptInjectionTime? fromNativeValue(
  1. int? value
)

Gets a possible UserScriptInjectionTime instance from a native value.

Implementation

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