createAudioMessage method Null safety
- {required String sessionId,
- required NIMSessionType sessionType,
- required String filePath,
- required int fileSize,
- required int duration,
- String? displayName,
- 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);
}