sendAudioMessage method
Future<String>
sendAudioMessage(
- String jid,
- String filePath,
- bool isRecorded,
- String duration,
- String replyMessageId, {
- String? audioFileUrl,
- String? topicId,
override
This method is used to send the audio message.
Implementation
@override
Future<String> sendAudioMessage(String jid, String filePath, bool isRecorded,
String duration, String replyMessageId,
{String? audioFileUrl, String? topicId}) async {
//sendAudio
String? audioResponse;
try {
audioResponse =
await mirrorFlyMethodChannel.invokeMethod('sendAudioMessage', {
"filePath": filePath,
"jid": jid,
"isRecorded": isRecorded,
"duration": duration,
"replyMessageId": replyMessageId,
"audiofileUrl": audioFileUrl,
"topicId": topicId
});
return convertChatMessageJsonFromString(audioResponse);
} on PlatformException catch (e) {
LogMessage.d("Platform Exception =", " $e");
rethrow;
} on Exception catch (error) {
LogMessage.d("Exception ", " $error");
rethrow;
}
}