SerializableObject class Null safety

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: [...]
read-only, override
hashCode int
The hash code for this object. [...]
read-only, inherited
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. [...]
read-only, override
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
transformers Map<String, dynamic Function(dynamic)>
Define any transformations for values. You can transform an enumeration to an int and the other way round: [...]
read-only, override

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
inherited

Operators

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