isar / isar/hive

int64 value save by hive after read value is not originally value

Open
#633 0 comments 0 reactions 1 assignee Claimed by @simc View on GitHub
problem
Dominant language
Dart
Stars
4.4k
Forks
449
PR merge metrics
No merged PRs in 30d

Description

**Steps to Reproduce**
int a=3809317795770925130;
* writ a to file by hive
* restart app
*when read a from hive file then hive return 3809317795770925056
![image](https://user-images.githubusercontent.com/22091417/114512418-af374200-9c6b-11eb-8f94-587616b9b5d4.png)

**Code sample**
example project
https://github.com/yeleibo/hive_bug
![image](https://user-images.githubusercontent.com/22091417/114511809-f83ac680-9c6a-11eb-9d50-8c1b774b82a5.png)

**the reason**
when var type is int64 save by hive ,hive writeInt(int value) will writeDouble(value.toDouble()); This operation will produce an error

**Version**
- Platform: iOS, Android, Mac, Windows, Linux, Web
- Flutter version: [e.g. 1.5.4]
- Hive version: [e.g. 0.5.0]

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.