Open impakte opened 1 year ago
When you are going to create an issue, always provide the most relevant information available (code, versions, etc.) "SAVE" time ! and the element with save() .
void main() async {
Hive.registerAdapter(PersonAdapter());
var persons = await Hive.openBox
var mario = Person('Mario'); var luna = Person('Luna'); var alex = Person('Alex'); persons.addAll([mario, luna, alex]);
mario.friends = HiveList(persons); // Create a HiveList mario.friends.addAll([luna, alex]); // Update Mario's friends mario.save(); // make persistent the change, print(mario.friends);
luna.delete(); // Remove Luna from Hive print(mario.friends); // HiveList updates automatically }
Hello everyone,
I found a bug I can't resolve when I kill my App. After Killing the app, the box are empty.
I tried to use Hive.close() to close all openned box or flush.
I saw old Issues talking about this specific problem but none gave me a solution. I'm using Hive in 2.0.4 but tried with other versions and have the same problem.