QuerySnapshot snapshot = await Firestore.instance
.collection("test")
.where("name", arrayContains: "B")
.limit(5)
.getDocuments();
var documentList = snapshot.documents;
print(documentList);
searchList = documentList;
searchList.forEach((res) {
print(res.data['name']);
});
DocumentList是一个空数组。 数据在数据库中的外观如下。