chat method

Future<Chat> chat(
  1. String contactId, {
  2. String? text,
  3. Map<String, dynamic>? resource,
})

Implementation

Future<Chat> chat(String contactId,
    {String? text, Map<String, dynamic>? resource}) async {
  final response = await dio
      .post('/chat/$contactId', data: {'resource': resource, 'text': text});
  return Chat.fromJson(response.data);
}