createTextMessage method Null safety

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

Create a text message.

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);
}