我使用 Hive 和 Flutter 来存储密钥为字母数字字符串的联系人,每个联系人数据都是一个带有时间戳的地图
框行=
Key. => Value
'abc123' => {'name': 'JK', 'country':'GB', 'timestamp': '568'},
'etergb' => {'name': 'FS', 'country':'DE', 'timestamp': '425'}
'546hfg' => {'name': 'TD', 'country':'GB', 'timestamp': '687'}
Run Code Online (Sandbox Code Playgroud)
现在可以使用where country=GB条件过滤这些并按 map.item.timestamp ASC/DESC 对行进行排序