【发布时间】:2021-03-04 19:43:47
【问题描述】:
当我必须返回一个字段名时,为什么它说“没有为类型 'Map
import 'package:mongo_dart/mongo_dart.dart';
var db = Db("mongodb://127.0.0.1:27017/test");
await db.open();
var collection = db.collection('Users');
await collection.find().forEach(
(users) {
dbfieldName = users.fieldName; // This is where the problem occurs.
},
);
提前致谢。
【问题讨论】:
标签: mongodb flutter dart mongo-dart