createAudioMessage method Null safety

Future<NIMResult<NIMMessage>> createAudioMessage(
  1. {required String sessionId,
  2. required NIMSessionType sessionType,
  3. required String filePath,
  4. required int fileSize,
  5. required int duration,
  6. String? displayName,
  7. NIMNosScene nosScene = NIMNosScenes.defaultIm}
)

Create an audio message.

Implementation

static Future<NIMResult<NIMMessage>> createAudioMessage(
    {required String sessionId,
    required NIMSessionType sessionType,
    required String filePath,
    required int fileSize,
    required int duration,
    String? displayName,
    NIMNosScene nosScene = NIMNosScenes.defaultIm}) async {
  var message = NIMMessage.audioEmptyMessage(
      sessionId: sessionId,
      sessionType: sessionType,
      filePath: filePath,
      fileSize: fileSize,
      duration: duration,
      displayName: displayName,
      nosScene: nosScene);
  return NimCore.instance.messageService._createMessage(message: message);
}