ServerTimestampHiveAdapter class
A hive TypeAdapter
for ServerTimestamps.
This is needed when working with ServerTimestamp 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 ServerTimestampHiveAdapter())
// continue with repository initialization
await ref.read(repositoryInitializerProvider().future);
Constructors
- ServerTimestampHiveAdapter([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) → ServerTimestamp -
Is called when a value has to be decoded.
override
-
toString(
) → String -
A string representation of this object.
inherited
-
write(
BinaryWriter writer, ServerTimestamp 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 ServerTimestampHiveAdapter