FieldValue.delete constructor
FieldValue.delete()
Removes the field from the document.
Allowed only at the top level of the data of update, or anywhere in the
data of a set with a merge option (SetOptions(merge: true),
SetOptions.mergeFields). Elsewhere,
including a plain set, the write fails with an ArgumentError.
await firestore.doc('cities/SF').update(<String, Object?>{
'capital': FieldValue.delete(),
});
Implementation
factory FieldValue.delete() => _deleteInstance;