createComment static method

Future<Map<String, dynamic>?> createComment({
  1. required String postId,
  2. required String content,
  3. required String authToken,
  4. String? parentId,
})

Implementation

static Future<Map<String, dynamic>?> createComment({
  required String postId,
  required String content,
  required String authToken,
  String? parentId,
}) async {
  final json = await _channel.invokeMethod<String>('createComment', {
    'postId': postId,
    'content': content,
    'authToken': authToken,
    'parentId': parentId,
  });
  if (json == null) return null;
  return jsonDecode(json) as Map<String, dynamic>;
}