Flutter Flatter-从cloud firestore中的文档中删除特定字段?
如何从cloud firestore文档中删除特定字段Flutter Flatter-从cloud firestore中的文档中删除特定字段?,flutter,Flutter,如何从cloud firestore文档中删除特定字段 有人建议我怎么做吗?要从cloud firestore文档中删除特定字段,请确保您使用的是插件版本0.8.0或更高版本。现在 例如,如果您有一个包含字段“Desc”的文档,其中包含一些文本。为了删除它 Firestore.instance.collection('path').document('name').updateData({'Desc': FieldValue.delete()}).whenComplete((){ print
有人建议我怎么做吗?要从cloud firestore文档中删除特定字段,请确保您使用的是插件版本0.8.0或更高版本。现在 例如,如果您有一个包含字段“Desc”的文档,其中包含一些文本。为了删除它
Firestore.instance.collection('path').document('name').updateData({'Desc': FieldValue.delete()}).whenComplete((){
print('Field Deleted');
});
这将从文档“名称”中删除“Desc”字段