I have data around 100 000 (each object consists 10 - 15 fields). It's crashing the application while trying to insert such data. I am bit confused whether choosing hive for this purpose was correct. I need to sync the data on regular basis. Is Hive compatible for storing such huge data. Currently I am trying to insert complete data at once. Is it a right choice to Use Hive or should i shift to other sources like sqflite or should I split the data while inserting.
Asked
Active
Viewed 484 times
0
-
1Since the rest of the world is not familiar with the unit "Lakh", you may want to pick an English term. I'm afraid we can only help you with your crash if you post your code and the error message/exception you get. – nvoigt Oct 26 '21 at 09:13
-
In debug mode its directly killing the application without showing any logs. Any way i will try it again and share the response. – Jashwanth Neela Oct 27 '21 at 07:26
1 Answers
0
I faced the same problem , after using app for a while app crashes suddenly due to some weird issue . Fixed this problem by this approach in main startup function of flutter app .
if (!Hive.isAdapterRegistered(77)) Hive.registerAdapter(AdapterName());
try {
if (!Hive.isBoxOpen('BoxName'))
await Hive.openBox<Type>('BoxName');
} catch (error) {
await Hive.deleteBoxFromDisk('BoxName');
await Hive.openBox('BoxName');
}

Md omer arafat
- 398
- 7
- 10