registerAdapter<T> abstract method
Register a TypeAdapter to announce it to Hive.
Tries to register adapter
to registry. If another adapter with same
typeId had been already registered an exception will thrown or the adapter
will be overridden if override
set to true
. Please note that internal
adapters are registered and maintained by hive itself. Use internal
parameter only if you want to override an existing adapter implementation.
Implementation
void registerAdapter<T>(
TypeAdapter<T> adapter, {
bool internal = false,
bool override = false,
});