CustomSerializer<I, O> class
Specifies a custom serializer/deserializer annotation for a field
Converts between type I (the field type) and type U (the serialized type)
- Inheritance
-
- Object
- Serializer<
I, O> - CustomSerializer
Constructors
- CustomSerializer({required O serialize(I value), required I deserialize(O value)})
-
Creates a Serializer with the given
serializeanddeserializefunctionsconst
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
-
deserialize(
O value) → I -
Function that converts from type
Oto typeIoverride -
deserializeUntyped(
Object? value) → Object? -
Deserialize a value without requiring the caller to know
O.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
serialize(
I value) → O -
Function that converts from type
Ito typeOoverride -
serializeUntyped(
Object? value) → Object? -
Serialize a value without requiring the caller to know
I.inherited -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited