sendMessage method

Future<void> sendMessage({
  1. required String content,
  2. required String echoId,
})

Sends ruut message. The echoId is your temporary message id. When message sends successfully RuutMessage will be returned with the echoId on RuutCallbacks.onMessageSent. If message fails to send RuutCallbacks.onError will be triggered echoId as data.

Implementation

Future<void> sendMessage(
    {required String content, required String echoId}) async {
  final request = RuutNewMessageRequest(content: content, echoId: echoId);
  await _repository.sendMessage(request);
}