EnumIndexConverter<T extends Enum> class

Implementation for an enum to int converter that uses the index of the enum as the value stored in the database.

Inheritance
Mixed-in types

Constructors

EnumIndexConverter(List<T> values)
Constant default constructor.
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>
All values of the enum.
final

Methods

fromJson(int json) → T
Map a value from json to something understood by the data class.
inherited
fromSql(int fromDb) → T
Maps a column from the database back to Dart.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson(T value) int
Map a value from the Data class to json.
inherited
toSql(T value) int
Map a value from an object in Dart into something that will be understood by the database.
override
toString() String
A string representation of this object.
inherited

Operators

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