sendImageMessage method

  1. @override
Future sendImageMessage(
  1. String jid,
  2. String filePath,
  3. String? caption,
  4. String? replyMessageID, [
  5. String? imageFileUrl,
])
override

Implementation

@override
Future<dynamic> sendImageMessage(
    String jid, String filePath, String? caption, String? replyMessageID,
    [String? imageFileUrl]) async {
  dynamic messageResp;
  try {
    messageResp =
        await mirrorFlyMethodChannel.invokeMethod('send_image_message', {
      "jid": jid,
      "filePath": filePath,
      "caption": caption?.trim(),
      "replyMessageId": replyMessageID,
      "imageFileUrl": imageFileUrl
    });
    debugPrint("Image Message Result ==> $messageResp");
    return messageResp;
  } on PlatformException catch (e) {
    debugPrint("Image Message Exception ===> $e");
    rethrow;
  } on Exception catch (error) {
    debugPrint("Image Message Exception ==> $error");
    rethrow;
  }
}