sendAudioMessage method Null safety

Future<NIMResult<NIMMessage>> sendAudioMessage(
  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,
  8. bool resend = false,
  9. 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);
}