【发布时间】:2021-06-15 06:01:00
【问题描述】:
我正在开发 Flutter/Firebase 项目。这段代码有一些问题:
db = FirebaseDatabase.instance.reference().child("Volunteers/"+vname);
db.once().then((DataSnapshot snapshot){
Map<dynamic, dynamic> values = snapshot.value;
values.forEach((key,values) {
print(values["cont"]);
});
});
运行时,我收到此错误Unhandled Exception: type 'String' is not a subtype of type 'int' of 'index'
请帮忙
【问题讨论】: