delete constant
FieldValue
const delete
Returns a sentinel for use with update() to mark a field for deletion.
final documentRef = firestore.doc('col/doc');
final data = { a: 'b', c: 'd' };
documentRef.set(data).then(() {
return documentRef.update({a: Firestore.FieldValue.delete()});
}).then(() {
// Document now only contains { c: 'd' }
});
Implementation
static const FieldValue delete = _DeleteTransform.deleteSentinel;