sendUserMessageWithText method

UserMessage sendUserMessageWithText(
  1. String text, {
  2. OnUserMessageCallback? onCompleted,
})

Sends UserMessage on this channel with text.

It returns UserMessage with MessageSendingStatus.pending and onCompleted will be invoked once the message has been sent completely. Channel event ChannelEventHandler.onMessageReceived will be invoked on all other members' end. NOTE that the pending message does not have a messageId.

Implementation

UserMessage sendUserMessageWithText(
  String text, {
  OnUserMessageCallback? onCompleted,
}) {
  final params = UserMessageParams(message: text);
  return sendUserMessage(
    params,
    onCompleted: onCompleted,
  );
}