PresetCodec<T> class abstract

Preset Codec

Conversion algorithm for Preset and PresetValue Few default preset codecs have been declared in the library including:

encode(TextStyle obj) {
  final type1 = qTextStyle.encode(obj);
  final type2 = TextStyleCodec().encode(obj);
}
Implementers

Constructors

PresetCodec()
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

decode(Map<String, dynamic>? data) → T?
Revert an encoded map of String to json encodable objects to an instance of T. Return null if data is null or conversion fails.
encode(T? obj) Map<String, dynamic>
Convert obj of type T to a map of String to json encodable objects. Can only be called once for each object in data heap.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited