ItemsConverter<T> class abstract

Used for getting objects from and to Map.

This is used for most handlers that extend ItemsHandler for getting statically typed object. There are only 2 methods that need to be overridden, fromJson and toJson. If user is using json_serializable it's pretty straight forward to write converter. Default converter form ItemsHandler is MapItemsConverter that will simply clone Map to another Map. You can check how SettingsConverter, ActivityConverter, or similar classes work. Map must have String as key, because that's only valid value for JSON.

Constructors

ItemsConverter()

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

fromJson(Map<String, Object?> data) → T
Converts item from Map to T
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson(T data) Map<String, Object?>
Converts item from T to Map
toString() String
A string representation of this object.
inherited

Operators

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