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

Constructors

CustomSerializer({required O serialize(I value), required I deserialize(O value)})
Creates a Serializer with the given serialize and deserialize functions
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

deserialize(O value) → I
Function that converts from type O to type I
override
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 I to type O
override
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