delete method

Future<void> delete (
  1. {Reach reach,
  2. bool mustExist: false}
)

Deletes the document.

An example:

final document = database.collection('recipe').document('tiramisu');
await document.delete(mustExist:true);

Implementation

Future<void> delete({
  Reach reach,
  bool mustExist = false,
}) {
  return DocumentDeleteRequest(
    document: this,
    mustExist: mustExist,
    reach: reach,
  ).delegateTo(parentDatabase.adapter);
}