registerAdapter<T> abstract method

void registerAdapter<T>(
  1. TypeAdapter<T> adapter, {
  2. bool internal = false,
  3. bool override = false,
})

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 exists adapter implementation.

Implementation

void registerAdapter<T>(
  TypeAdapter<T> adapter, {
  bool internal = false,
  bool override = false,
});