comment method

Future<Comment> comment(
  1. int documentId, {
  2. String? text,
  3. Map<String, dynamic>? resource,
})

Implementation

Future<Comment> comment(int documentId,
    {String? text, Map<String, dynamic>? resource}) async {
  final response = await dio.post('/comments/$documentId',
      data: {'resource': resource, 'text': text});
  return Comment.fromJson(response.data);
}