deleteSubDocument method

Future<void> deleteSubDocument(
  1. String collectionPath,
  2. String docId,
  3. String subCollection,
  4. String subDocId,
)

Delete a specific subdocument from a subcollection.

collectionPath - The path of the parent collection. docId - The ID of the parent document. subCollection - The name of the subcollection within the parent document. subDocId - The ID of the subdocument to delete.

Implementation

Future<void> deleteSubDocument(
    String collectionPath, String docId, String subCollection, String subDocId) async {
  await _db.collection(collectionPath).doc(docId).collection(subCollection).doc(subDocId).delete();
}