NIMMessage.textEmptyMessage constructor Null safety

NIMMessage.textEmptyMessage(
  1. {required String sessionId,
  2. required NIMSessionType sessionType,
  3. required String text}
)

Implementation

factory NIMMessage.textEmptyMessage(
    {required String sessionId,
    required NIMSessionType sessionType,
    required String text}) {
  return NIMMessage(
    messageDirection: NIMMessageDirection.outgoing,
    messageType: NIMMessageType.text,
    content: text,
    timestamp: new DateTime.now().millisecondsSinceEpoch,
    status: NIMMessageStatus.sending,
    sessionId: sessionId,
    sessionType: sessionType,
    messageAttachment: null,
    attachmentStatus: NIMMessageAttachmentStatus.transferred,
  );
}