Hive supports all primitive types,
Uint8List. If you want to store other objects, you have to register a
TypeAdapter which converts the object from and to binary form.
You can either write a
TypeAdapter yourself or generate it. Most of the time the generated adapter will perform really good. Sometimes you there are small things you can improve with a manually written adapter.
When you want Hive to use a
TypeAdapter, you have to register it. Two things are needed for that: An instance of the adapter and a
typeId. Every type has a unique
typeId which is used to find the correct adapter when a value is brought back from disk. All
typeIds between 0 and 223 are allowed.