HiveDB(Flutter) - persisting data in web local storage

868 Views Asked by At

I have a short sample flutter/dart source code from one of the blogs that saves the to do data in hivedb. I can see that if i install the apk on my android device and enter few records, they show up even if i restart the device. However, when i try the same code and run on the Chrome, everytime i run it, the data i've previously saved is gone.

is this normal? I really like using hiveDB as a simple database using flutter. is there a way to save the data in browser's local storage with hivedb? I would like to create a PWA using flutter in the future.

Thank you,

1

There are 1 best solutions below

0
On BEST ANSWER

Found out that the issue was with the port. i am using "flutter run -d chrome" and need to add the port and use the same port number. so it should be "flutter run -d chrome --web-port 5555". got the answer from https://github.com/hivedb/hive/issues/587.