NullAwareTypeConverter<D, S extends Object> class
abstract
A type converter automatically mapping null
values to null
in both
directions.
Instead of overriding mapToDart and mapToSql, subclasses of this converter should implement requireMapToDart and requireMapToSql, which are used to map non-null values to and from sql values, respectively.
Apart from the implementation changes, subclasses of this converter can be used just like all other type converters.
- Inheritance
-
- Object
- TypeConverter<
D, S> - NullAwareTypeConverter
- Implementers
Constructors
- NullAwareTypeConverter()
-
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
Methods
-
mapToDart(
S? fromDb) → D? -
Maps a column from the database back to Dart.
override
-
mapToSql(
D? value) → S? -
Map a value from an object in Dart into something that will be understood
by the database.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
requireMapToDart(
S fromDb) → D - Maps a non-null column from the database back to Dart.
-
requireMapToSql(
D value) → S - Map a non-null value from an object in Dart into something that will be understood by the database.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited