Closed ampersanda closed 4 years ago
You need to swap these two lines:
await Future.wait([Hive.openBox<Note>('notes')]);
Hive.registerAdapter<Note>(NoteAdapter());
The adapter needs to be registered before you open a box.
Thank you, it's fix this issue 🙃
Steps to Reproduce
A newly fresh project and setup for Hive and I don't have an Adapter which has 33
typeId
. This happens when I hot restart the current project and the way to fix this is by deleting the application. Here's short [Youtube Video] for (https://www.youtube.com/watch?v=l59ysgMz1uk&feature=youtu.be)Here's the error
Code sample
note.dart
note.g.dart
main.dart
Version