答案 0 :(得分:3)
要更新isVerified
,您必须执行以下操作:
Firestore.instance.collection("collection Name").document("documentId").updateData({
"Personal Info.address.isVerified": true,
}).then((_) {
print("success!");
});
答案 1 :(得分:2)
由于您没有提供您的收藏或文件名称,所以我会组成一个
因此,假设每次单击按钮时,值应更改为true
CollectionReference humanCollection = Firestore.instance.collection("collection Name");
//This is the button
FlatButton(
onPressed: () => changeValue();
child : Container(
Text : 'Change Value'
)
),
//This is the function
changeValue(){
humanCollection
.document(currentHuman.id)//put the document name here
.updateData({
'Personal Info.address.isVerified' : true,
});
}