indexOf<T> static method

int indexOf<T>(
  1. List<T> enumValues,
  2. String value
)

Implementation

static int indexOf<T>(List<T> enumValues, String value) {
  final T? fromStringResult = fromString<T>(enumValues, value);
  if (fromStringResult == null) {
    return -1;
  } else {
    return enumValues.indexOf(fromStringResult);
  }
}