【发布时间】:2019-01-29 16:37:23
【问题描述】:
我正在尝试从文档中检索数组字段并将其存储在列表对象中。
到目前为止,这是我尝试过的:
List<String> list;
Firestore.instance.collection("ingredients").document("Cutlet").get()
.then((snapshot) => list = snapshot.data["ingredients"]);
debugPrint("list is" + list.toString());
return list;
debugPrint 返回 null。
这是我的 Firestore 的快照。我正在尝试检索成分数组并将其存储在列表中。
【问题讨论】:
-
然后尝试打印/返回里面的列表或者使用await
标签: dart flutter google-cloud-firestore