EnumIndexConverter<T extends Enum> class Typed Data

A ScalarConverter that encodes Enum values by their index.

Inheritance
Annotations
  • @experimental

Constructors

EnumIndexConverter(List<T> values)
Creates a ScalarConverter that encodes Enum values by their index.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
values List<T>
The list returned from Enum.values.
final

Methods

fromData(Object value) → T
Recreates an object from the given data representation.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toData(T value) Object
Returns the data representation of the object.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited