sendTextMessage method

Future<NIMResult<NIMMessage>> sendTextMessage(
  1. {required String sessionId,
  2. required NIMSessionType sessionType,
  3. required String text,
  4. MessageAction? action}
)

发送文本消息

Implementation

Future<NIMResult<NIMMessage>> sendTextMessage({
  required String sessionId,
  required NIMSessionType sessionType,
  required String text,
  MessageAction? action,
}) async {
  final message = NIMMessage.textEmptyMessage(
      sessionId: sessionId, sessionType: sessionType, text: text);
  return _createMessageAndSend(message, action);
}