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
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