EnumIndexConverter<T> class

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

Inheritance

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

mapToDart(int? fromDb) → T?
Maps a column from the database back to Dart.
inherited
mapToSql(T? value) int?
Map a value from an object in Dart into something that will be understood by the database.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
requireMapToDart(int fromDb) → T
Maps a non-null column from the database back to Dart.
override
requireMapToSql(T value) int
Map a non-null 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