deleteComment method

Future<void> deleteComment(
  1. String commentSectionID,
  2. CommentModel comment
)

Deletes a comment with the given commentID and commentSectionID.

Implementation

Future<void> deleteComment(
  String commentSectionID,
  CommentModel comment,
) async {
  instance.collection('comments').doc(commentSectionID).update({
    comment.commentID: FieldValue.delete(),
    'lastEdited': comment.commentID,
  });
}