replyLocation method

Future<Message> replyLocation(
  1. double latitude,
  2. double longitude, {
  3. bool withQuote = false,
  4. double? horizontalAccuracy,
  5. int? livePeriod,
  6. int? heading,
  7. int? proximityAlertRadius,
  8. bool? disableNotification,
  9. bool? allowSendingWithoutReply,
  10. ReplyMarkup? replyMarkup,
})

Reply to the recieved message with a location

A wrapper around TeleDart.sendLocation. On success, returns the sent Message.

Apart from a latitude and a longitude, it can also take some options that control the message appearance and behavior.

Check Telegram API documentation for more information about those options.

Implementation

Future<Message> replyLocation(
  double latitude,
  double longitude, {
  bool withQuote = false,
  double? horizontalAccuracy,
  int? livePeriod,
  int? heading,
  int? proximityAlertRadius,
  bool? disableNotification,
  bool? allowSendingWithoutReply,
  ReplyMarkup? replyMarkup,
}) =>
    _teledart.sendLocation(chat.id, latitude, longitude,
        messageThreadId: messageThreadId,
        horizontalAccuracy: horizontalAccuracy,
        livePeriod: livePeriod,
        heading: heading,
        proximityAlertRadius: proximityAlertRadius,
        disableNotification: disableNotification,
        replyToMessageId: withQuote ? messageId : null,
        allowSendingWithoutReply: allowSendingWithoutReply,
        replyMarkup: replyMarkup);