deleteAllDocuments method

Future<List<DocumentReference<Object?>>> deleteAllDocuments({
  1. int batchSize = 500,
})

Delete all documents

Default value of batchSize is 500, which is max limit of Batch Write. Return value is deleted document references.

Implementation

Future<List<DocumentReference>> deleteAllDocuments({
  int batchSize = 500,
}) async {
  return _deleteQueryBatch(
    query: query.orderBy(FieldPath.documentId).limit(batchSize),
    batchSize: batchSize,
    deletedRefs: [],
  );
}