Data not persisted across web and mobile
- Dominant language
- Dart
- Stars
- 4.4k
- Forks
- 449
- PR merge metrics
- No merged PRs in 30d
Description
I am currently using Hive with Flutter and I am inserting dummy data to test if data is being persisted throughout both these platforms (web and mobile).
What is happening is that the data is being persisted on the mobile app but not on the web.
Steps to reproduce:
1. insert dummy data so what I did was:
I have my own class called UserInfo and I am inserting this as a value to hivedb with the key "fakeemail@gmail.com"
```
UserInfo temp = new UserInfo("dummy", "data", "org1", "fakeemail@gmail.com", "password");
Hive.box('userInfo').put("fakeemail@gmail.com", temp);
```
2. Then, I will comment out these two lines of code and insert this line of code:
`print(Hive.box('userInfo').containsKey("fakeemail@gmail.com"));`
3. I will then hot restart the application and when I run the app this time, that print statement should output true. (which it does). So data is being persisted in the mobile app.
4. Run the app on the web (leaving all code as is).
What happens this time though, is that the print statement will output false. So what I am getting from this is that, the data is not being persisted from mobile to web.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.