我想从邮件集中检索文档;但我没有得到结果,而且我也没有从颤动中出错。这是我的代码
body: new Center(
child: new StreamBuilder(
stream: Firestore.instance.collection("messages").snapshots(),
builder: (context, snapshot){
if(!snapshot.hasData) return const Text("Chargement ...");
return ListView.builder(
itemCount: snapshot.data.documents.length,
itemBuilder: (context, index)=> new Text("papa"),
);
}
),
)
答案 0 :(得分:0)
使用new Text(document['papa'])