sendMessage method
Sends a text message in a given conversation.
Implementation
Future<void> sendMessage(String text, {SendMessageOptions? options}) {
_createConversation();
if (options != null) {
_session.execute(
'conversations["${id}"].sendMessage("$text", ${json.encode(options)});');
} else {
_session.execute('conversations["${id}"].sendMessage("$text");');
}
// We return a Future, because we expect to refactor this code to use the Data Layer,
// and handle failures as well.
return Future<void>.value();
}