NIMMessage.customEmptyMessage constructor Null safety
- {required String sessionId,
- required NIMSessionType sessionType,
- String? content,
- NIMMessageAttachment? attachment,
- NIMCustomMessageConfig? config}
Create a custom message
Implementation
factory NIMMessage.customEmptyMessage(
{required String sessionId,
required NIMSessionType sessionType,
String? content,
NIMMessageAttachment? attachment,
NIMCustomMessageConfig? config}) {
return NIMMessage(
messageDirection: NIMMessageDirection.outgoing,
messageType: NIMMessageType.custom,
timestamp: new DateTime.now().millisecondsSinceEpoch,
status: NIMMessageStatus.sending,
sessionId: sessionId,
sessionType: sessionType,
content: content,
messageAttachment: attachment,
config: config);
}