【发布时间】:2021-06-14 06:37:34
【问题描述】:
大家好,我正在从 firestore 获取数据。在这种情况下,我试图将 RefreshIndicator() 添加到 onRefresh();当我只使用没有查询的数据时,我看不到任何错误,它的工作原理很清楚
tumGonderiler() async {
QuerySnapshot myQuerySnapshot = await akisRef.get();
setState(() {
this.tEdilenGonderiler = myQuerySnapshot.docs.map((e) => e.data()).toList();
});
} 但是当我尝试使用 where 参数在我的集合中查询时,onRefresh() 在我的页面中不起作用,不起作用的代码如下
tumGonderiler() async {
QuerySnapshot myQuerySnapshot = await akisRef.where("ownerID", whereIn: takipEdilenKullanicilar.map((e) => e.id).toList()).get();
setState(() {
this.tEdilenGonderiler = myQuerySnapshot.docs.map((e) => e.data()).toList();
});
}
【问题讨论】:
标签: flutter google-cloud-firestore