sendDocumentMessage method

  1. @override
Future sendDocumentMessage(
  1. String jid,
  2. String documentPath,
  3. String replyMessageId, [
  4. String? fileUrl,
])
override

Implementation

@override
Future<dynamic> sendDocumentMessage(
    String jid, String documentPath, String replyMessageId,
    [String? fileUrl]) async {
  dynamic documentResponse;
  try {
    documentResponse =
        await mirrorFlyMethodChannel.invokeMethod('sendDocumentMessage', {
      "file": documentPath,
      "jid": jid,
      "replyMessageId": replyMessageId,
      "file_url": fileUrl
    });
    debugPrint("documentResponse ==> $documentResponse");
    return documentResponse;
  } on PlatformException catch (e) {
    debugPrint("Platform Exception ===> $e");
    rethrow;
  } on Exception catch (error) {
    debugPrint("Exception ==> $error");
    rethrow;
  }
}