chat method
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);
}