fromInt<T> static method

T? fromInt<T>(
  1. List<T> enumValues,
  2. int value
)

Implementation

static T? fromInt<T>(List<T> enumValues, int value) {
  /// Returns the enum item from an [int] value.
  /// It receives a [List] of enum values and an [int] value as parameters.
  /// It returns the enum item.
  /// If the [value] is null, it returns null.
  return enumValues[value];
}