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