sendCustomMessage method Null safety

Future<NIMResult<NIMMessage>> sendCustomMessage(
  1. {required String sessionId,
  2. required NIMSessionType sessionType,
  3. String? content,
  4. NIMMessageAttachment? attachment,
  5. NIMCustomMessageConfig? config,
  6. bool resend = false,
  7. MessageAction? action}
)

Send a custom message.

Implementation

Future<NIMResult<NIMMessage>> sendCustomMessage({
  required String sessionId,
  required NIMSessionType sessionType,
  String? content,
  NIMMessageAttachment? attachment,
  NIMCustomMessageConfig? config,
  bool resend = false,
  MessageAction? action,
}) async {
  var message = NIMMessage.customEmptyMessage(
      sessionId: sessionId,
      sessionType: sessionType,
      content: content,
      attachment: attachment,
      config: config);
  return _createMessageAndSend(message, action, resend);
}