ServerIncrementableHiveAdapter<T extends num> class

A hive TypeAdapter for ServerIncrementables.

This is needed when working with ServerIncrementable as otherwise the local hive adapter will not be able to store the timestamps. To register it, simply add the adapter to the hive local storage before initializing the repositories:

// register adapter
ref.read(hiveLocalStorageProvider).hive
  .registerAdapter(const ServerIncrementableHiveAdapter<T>())

// continue with repository initialization
await ref.read(repositoryInitializerProvider().future);

Constructors

ServerIncrementableHiveAdapter([int typeId = defaultTypeId])
Default constructor
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
typeId int
Called for type registration
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
read(BinaryReader reader) ServerIncrementable<T>
Is called when a value has to be decoded.
override
toString() String
A string representation of this object.
inherited
write(BinaryWriter writer, ServerIncrementable<T> obj) → void
Is called when a value has to be encoded.
override

Operators

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

Constants

defaultTypeId → const int
The default type id for the ServerIncrementableHiveAdapter