Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/wcf/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Flutter Flatter-从cloud firestore中的文档中删除特定字段?_Flutter - Fatal编程技术网

Flutter Flatter-从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文档中删除特定字段


有人建议我怎么做吗?

要从cloud firestore文档中删除特定字段,请确保您使用的是插件版本0.8.0或更高版本。现在 例如,如果您有一个包含字段“Desc”的文档,其中包含一些文本。为了删除它

Firestore.instance.collection('path').document('name').updateData({'Desc': FieldValue.delete()}).whenComplete((){
  print('Field Deleted');
});
这将从文档“名称”中删除“Desc”字段