Google cloud firestore 带角省道的Firestore查询集合

Google cloud firestore 带角省道的Firestore查询集合,google-cloud-firestore,angular-dart,Google Cloud Firestore,Angular Dart,我当前正在导入以下程序包: import 'package:firebase/firebase.dart' as fb; 然后在初始化firebase对象fb之后,我初始化firestore类: var firestore = fb.firestore(); 我想查询并遍历我的集合,显示每个文档的数据,但现在不知道如何查询,这就是我目前所拥有的 var doc = firestore.collection('data').doc('one').get() 这将返回未来的DocumentSn

我当前正在导入以下程序包:

import 'package:firebase/firebase.dart' as fb;
然后在初始化firebase对象fb之后,我初始化firestore类:

var firestore = fb.firestore();
我想查询并遍历我的集合,显示每个文档的数据,但现在不知道如何查询,这就是我目前所拥有的

var doc = firestore.collection('data').doc('one').get()
这将返回未来的DocumentSnapshot

我看到一些旧帖子使用了不同版本的angular dart,但是包装器代码已经改变了。任何帮助都将不胜感激

var doc = firestore.collections('data').doc('one').get();
doc.then((d) {
  print(d.data());
});