【发布时间】:2020-06-09 13:28:24
【问题描述】:
我正在尝试将我的 Firestore 集合转换为 csv 格式,以便我可以在代码中通过电子邮件发送它。 我这样做的方式如下:
_sendMail() async{
List tempList = await Firestore.instance
.collection("transactions")
.snapshots()
.toList();
print(tempList.toString());
final res = const ListToCsvConverter().convert(tempList);
print(res.toString());
}
异步函数从不打印临时列表和 res,所以我假设它卡在集合检索部分。 我知道 firestore 集合有效,因为我在应用程序的其他部分从中检索文档。
我正在使用 csv 包转换为需要列表的 csv 格式:https://pub.dev/packages/csv
有谁知道我做错了还是有其他方法?
【问题讨论】:
标签: flutter dart google-cloud-firestore