Skip to main content

createComment method

Future createComment (String msg)

This function add comment on the post. The function uses createComments method provided by Comment Service.

params:

  • msg : text of the comment to add.

Implementation

Future createComment(String msg) async {
print("comment viewModel called");
await _commentService.createComments(_postID, msg);
addCommentLocally(msg);
}