sendAudioMessage method Null safety
- {required String sessionId,
- required NIMSessionType sessionType,
- required String filePath,
- required int fileSize,
- required int duration,
- String? displayName,
- NIMNosScene nosScene = NIMNosScenes.defaultIm,
- bool resend = false,
- MessageAction? action}
Send an audio message.
Implementation
Future<NIMResult<NIMMessage>> sendAudioMessage({
required String sessionId,
required NIMSessionType sessionType,
required String filePath,
required int fileSize,
required int duration,
String? displayName,
NIMNosScene nosScene = NIMNosScenes.defaultIm,
bool resend = false,
MessageAction? action,
}) async {
final message = NIMMessage.audioEmptyMessage(
sessionId: sessionId,
sessionType: sessionType,
filePath: filePath,
fileSize: fileSize,
duration: duration,
displayName: displayName,
nosScene: nosScene);
return _createMessageAndSend(message, action, resend);
}