EnumAdapter<T extends Enum> constructor

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

Creates a new enum adapter with the specified list of enum values.

The values list should contain all possible values of the enum, typically obtained via EnumType.values.

Implementation

EnumAdapter(this.values);