sendTextMessage method Null safety

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

Send a text message.

Implementation

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