sendLocationMessage method

  1. @override
Future<String> sendLocationMessage(
  1. String jid,
  2. double latitude,
  3. double longitude,
  4. String replyMessageId, {
  5. String? topicId,
})
override

This method is used to send the location message.

Implementation

@override
Future<String> sendLocationMessage(
    String jid, double latitude, double longitude, String replyMessageId,
    {String? topicId}) async {
  //sentLocationMessage
  String? messageResp;
  try {
    messageResp =
        await mirrorFlyMethodChannel.invokeMethod('sendLocationMessage', {
      "jid": jid,
      "latitude": latitude,
      "longitude": longitude,
      "replyMessageId": replyMessageId,
      "topicId": topicId
    });
    return convertChatMessageJsonFromString(messageResp);
  } on PlatformException catch (e) {
    LogMessage.d("Flutter Exception =", " $e");
    rethrow;
  } on Exception catch (error) {
    LogMessage.d("Flutter Exception ", " $error");
    rethrow;
  }
}