OfflineFirstSerdes<_RemoteSerializeType, _SqliteSerializeType> class

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. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
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
Returns a string representation of this object.
inherited

Operators

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