createComment method

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

Creates a comment with the given text and userID.

Implementation

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