updateSubDocument method

Future<void> updateSubDocument(
  1. String collectionPath,
  2. String docId,
  3. String subCollection,
  4. String subDocId,
  5. Map<String, dynamic> data,
)

Update a specific subdocument within 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 update. data - A map containing the fields and values to update.

Implementation

Future<void> updateSubDocument(String collectionPath, String docId, String subCollection, String subDocId,
    Map<String, dynamic> data) async {
  await _db.collection(collectionPath).doc(docId).collection(subCollection).doc(subDocId).update(data);
}