NIMMessage.customEmptyMessage constructor
- {required String sessionId,
- required NIMSessionType sessionType,
- String? content,
- NIMMessageAttachment? attachment,
- NIMCustomMessageConfig? config}
创建自定义消息
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);
}