D, S, J> mixin
A mixin for TypeConverters that should also apply to drift's builtin JSON serialization of data classes.
Unlike the old JsonTypeConverter mixin, this more general mixin allows
using a different type when serializing to JSON (
J) than the type used in
For the cases where the JSON serialization and the mapping to SQL use the
same types, it may be more convenient to mix-in JsonTypeConverter instead.
- Superclass Constraints
- Mixin Applications
- hashCode → int
The hash code for this object.
- runtimeType → Type
A representation of the runtime type of the object.
J json) → D
- Map a value from json to something understood by the data class.
S fromDb) → D
Maps a column from the database back to Dart.
Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
D value) → J
- Map a value from the Data class to json.
D value) → S
Map a value from an object in Dart into something that will be understood
by the database.
) → String
A string representation of this object.
Object other) → bool
The equality operator.
D, S extends Object, J extends Object>( JsonTypeConverter2< D, S, J>inner) → JsonTypeConverter2< D?, S?, J?>
innertype converter that only considers non-nullable values as a type converter that handles null values too.