fromValue static method

UserScriptInjectionTime? fromValue(
  1. int? value
)

Gets a possible UserScriptInjectionTime instance from int value.

Implementation

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