createComments method
Future<void> createComments (String postId, String text)
<p>This function is used to add comment on the post.</p> <p>parameters:</p> <ul> <li><code>postId</code> - Post id where comment need to be added.</li> <li><code>text</code> - content of the comment.</li> </ul>
Implementation
Future\<void\> createComments(String postId, String text) async \{
print("comment service called");
final String createCommentQuery = CommentQueries().createComment();
final result = await _dbFunctions.gqlAuthMutation(
createCommentQuery,
variables: \{
'postId': postId, Add your variables here
'text': text
\},
);
print("comment added");
print(result);
return result;
\}