【发布时间】:2020-04-13 11:40:27
【问题描述】:
尽管有 here 的文档,Flutter 还是给了我错误:
The method 'get' isn't defined for the class 'DocumentSnapshot'.
这是我的代码:
Future<Object> getFromDocumentSnapshot(String email, String field) async {
Firestore.instance
.collection('users')
.document(email)
.get()
.then((DocumentSnapshot ds) {
return ds.get(field);
});
}
不确定这个。有什么明显的问题吗?谢谢!
【问题讨论】:
标签: mysql firebase flutter dart google-cloud-firestore