Disable lexicographic sorting for keys
- Dominant language
- Dart
- Stars
- 4.4k
- Forks
- 449
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
**Question**
Currently I have a uID generated for each of the values stored in the hive database. The uID is both numbers and letters and as a result of the default lexicographical sorting it is messing up the position in which the data is put into. I was wondering if there is anyway to turn this off. An example of some code is listed under:
----------
**Example:**
```
box.put('abcd', 'value1');
box.put('adcb', 'value2');
box.put('acdb', 'value3');
ListView.builder(
builder: (BuildContext context, int index){
print(box.get(index)); //because of default sorting the order is now: value1, value3, value2 when it should really be: value1, value2, value3.
return . . . ;
}
)
```
---------
**Version**
- Platform: iOS, and Android (for my use case but this problem would apply to all platforms)
- Flutter: Channel stable - v2.5.3
- Hive version: v1.1.0
--------
Bottom line is that please let me know if theres anyway that I can disable this default sorting as it is currently quite the hinderance to my app.
Thanks,
Rhino Inani
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.