createTextMessage static method

Future<NIMResult<NIMMessage>> createTextMessage(
  1. {required String sessionId,
  2. required NIMSessionType sessionType,
  3. required String text}
)

创建文本消息

Implementation

static Future<NIMResult<NIMMessage>> createTextMessage(
    {required String sessionId,
    required NIMSessionType sessionType,
    required String text}) async {
  var message = NIMMessage.textEmptyMessage(
      sessionId: sessionId, sessionType: sessionType, text: text);
  return NimCore.instance.messageService._createMessage(message: message);
}