When working with HIVE database in flutter. If you ever get error like this:
"Box not found. Did you forget to call Hive.openBox()?"
It means you haven't opened your box to
To resolve this issue call
await Hive.openBox("boxname");
before using the box
With hive, before you can read/compose data, a box should be opened. Boxes can be opened with await Hive. Openbox('name') can get an instance of an opened box with Hive. Box ('name'), where 'name' is the name of the case (saying the DB name). You can call Hive.
It means you haven't opened your box. To resolve this issue call
await Hive.openBox("boxname");
before using the box.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With