Serializer<T, U> class
Specifies a custom serializer/deserializer annotation for a field
Converts between type T (the field type) and type U (the serialized type)
Constructors
- Serializer({required U serialize(T value), required T deserialize(U value)})
-
Creates a Serializer with the given
serializeanddeserializefunctionsconst
Properties
- deserialize → T Function(U value)
-
Function that converts from type
Uto typeTfinal - hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- serialize → U Function(T value)
-
Function that converts from type
Tto typeUfinal
Methods
-
deserializeUntyped(
Object? value) → Object? -
Deserialize a value without requiring the caller to know
U. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
serializeUntyped(
Object? value) → Object? -
Serialize a value without requiring the caller to know
T. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited