hive
hive copied to clipboard
big int will be 48856307306397696
final user = {
'id': 48856307306397697,
'accountId': 1967,
};
final dir = await getApplicationDocumentsDirectory();
final box = await Hive.openBox("test", path: dir.path);
// ⚠️ readUser.id will be 48856307306397696 next launch time
final readUser = box.get("user");
// write user
box.put('user', user);
await box.flush();
// readUser.id will be correct
final readUser2 = box.get("user");
// readUser2.id will be 48856307306397697
issure version:
- hive 2.2.3
- hive 3.0.0-dev
hive 4.0.0-dev.2: this version work well