OfflineFirstSerdes<_RemoteSerializeType, _SqliteSerializeType> class abstract

A class that isn't connected to the OfflineFirstRepository but is still used by OfflineFirstModels (such as a Cash class that declares amount and currency). OfflineFirstSerdes must extend the class in end implementation.

This is best used to extends non-primitive types that are not associations but still need to be serialized and deserialized as a field.

Type parameters are required. For _SqliteSerializeType (second arg), these may be any of the following: bool, DateTime, double, int, num, String. _RemoteSerializeType should support the same types in addition to Iterable and Maps digestible by jsonEncode and jsonDecode unless otherwise specified.

Declare factory methods fromSqlite and from<REMOTE PROIVDER(s)> (like fromRest) to deserialize. Both use one unnamed arg with a type post-jsonDecode.

Constructors

OfflineFirstSerdes()

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

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toGraphql() → _RemoteSerializeType?
Pre-serialization to JSON. Must be digestible by jsonEncode.
toRest() → _RemoteSerializeType?
Pre-serialization to JSON. Must be digestible by jsonEncode.
toSqlite() → _SqliteSerializeType?
Must be one of the following: bool, DateTime, double, int, num, String, or another Iterable digestible by jsonEncode.
toString() String
A string representation of this object.
inherited

Operators

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