EnumType<T extends Enum> constructor

EnumType<T extends Enum>(
  1. List<T> values
)

Creates a new instance of the EnumType class with the specified values.

@param values The list of enum values. Must not be empty. @throws AssertionError if values is empty in debug mode.

Implementation

EnumType(this.values)
    : assert(values.isNotEmpty, 'Enum values cannot be empty');