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
-
- Object
- TypeConverter<
T, int> - NullAwareTypeConverter<
T, int> - EnumIndexConverter
Constructors
-
EnumIndexConverter(List<
T> values) -
Constant default constructor.
const
Properties
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