SerializableObject class

Implementation of Serializable. Extend this class if in doubt. Use the attributes field to store and retrieve values, e.g.

 int get price => attributes['price'];
 set price(int value) => attributes['price'] = value;

Define creators and transformers as necessary in objectCreators and transformers.

Implemented types

Constructors

SerializableObject()

Properties

attributes Map<String, dynamic>
Holds all values that should be serialized. Can either be generated upon demand or used all the time. Example for using attributes as the data store:
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
objectCreators Map<String, dynamic Function(Map<String, dynamic>?)>
Define functions that create new complex serializable or Map instances for nested objects. You can evaluate the provided map value to select a specific subclass, if needed.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
transformers Map<String, dynamic Function(dynamic)>
Define any transformations for values. You can transform an enumeration to an int and the other way round:
no setteroverride

Methods

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