sendAudioMessage method

void sendAudioMessage(
  1. String filePath,
  2. int fileSize,
  3. int duration, {
  4. NIMMessage? replyMsg,
})

Implementation

void sendAudioMessage(String filePath, int fileSize, int duration,
    {NIMMessage? replyMsg}) {
  MessageBuilder.createAudioMessage(
          sessionId: sessionId,
          sessionType: sessionType,
          filePath: filePath,
          fileSize: fileSize,
          duration: duration)
      .then((value) {
    if (value.isSuccess) {
      sendMessage(value.data!, replyMsg: replyMsg);
    }
  });
}