【发布时间】:2020-07-20 13:07:13
【问题描述】:
我在 Flutter 中使用 hive 创建了一个动态数据库。如何获取某个索引中的值?我需要在 index 中获取 totalSec 的值。我要删除,所以我可以减去它的总时间,但我不知道怎么做。
下面是我的代码 sn-p 示例:
child: new InkWell(
borderRadius: BorderRadius.circular(1000.0),
onTap: () {
newRoutineList.removeAt(index);
rtnConfigBox.deleteAt(index);
_rtnTotalSec = _rtnTotalSec - rtnConfigBox.getAt(index.totalSec); //Error: the getter 'totalSec' isn't defined for the class 'int'.
setState(() {});
},
【问题讨论】:
标签: database flutter indexing dynamic flutter-hive