Skip to content

big int will be 48856307306397696 #1327

@zhengbomo

Description

@zhengbomo
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions