hive
hive copied to clipboard
Support for record types
Since Dart 3 we have had records. They're great and I use them extensively. I just ran into a problem though - Hive doesn't seem to support them yet, and whenever trying to save objects that include them, you get an error like this:
HiveError (HiveError: Cannot write, unknown type: (int, int). Did you forget to register an adapter?)
It's also not possible to generate type adapters like this:
@HiveType(typeId: 3)
typedef IntVec = (int, int);
(although this solution would not be great anyway)