InlineQueryResultLocation constructor

const InlineQueryResultLocation({
  1. @JsonKey(name: 'type') @Default(InlineQueryResultType.location) InlineQueryResultType type,
  2. @JsonKey(name: 'id') required String id,
  3. @JsonKey(name: 'latitude') required double latitude,
  4. @JsonKey(name: 'longitude') required double longitude,
  5. @JsonKey(name: 'title') required String title,
  6. @JsonKey(name: 'horizontal_accuracy') int? horizontalAccuracy,
  7. @JsonKey(name: 'live_period') int? livePeriod,
  8. @JsonKey(name: 'heading') int? heading,
  9. @JsonKey(name: 'proximity_alert_radius') int? proximityAlertRadius,
  10. @JsonKey(name: 'reply_markup') InlineKeyboardMarkup? replyMarkup,
  11. @JsonKey(name: 'input_message_content') @InputMessageContentConverter() InputMessageContent? inputMessageContent,
  12. @JsonKey(name: 'thumbnail_url') String? thumbnailUrl,
  13. @JsonKey(name: 'thumbnail_width') int? thumbnailWidth,
  14. @JsonKey(name: 'thumbnail_height') int? thumbnailHeight,
})

Constructs an InlineQueryResultLocation object

Implementation

const factory InlineQueryResultLocation({
  /// Type of the result, always [InlineQueryResultType.location]
  @JsonKey(name: 'type')
  @Default(InlineQueryResultType.location)
  InlineQueryResultType type,

  /// Unique identifier for this result, 1-64 Bytes
  @JsonKey(name: 'id') required String id,

  /// Location latitude in degrees
  @JsonKey(name: 'latitude') required double latitude,

  /// Location longitude in degrees
  @JsonKey(name: 'longitude') required double longitude,

  /// Location title
  @JsonKey(name: 'title') required String title,

  /// Optional. The radius of uncertainty for the location, measured in meters; 0-1500
  @JsonKey(name: 'horizontal_accuracy') int? horizontalAccuracy,

  /// Optional. Period in seconds for which the location can be updated, should be between 60 and 86400.
  @JsonKey(name: 'live_period') int? livePeriod,

  /// Optional. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.
  @JsonKey(name: 'heading') int? heading,

  /// Optional. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.
  @JsonKey(name: 'proximity_alert_radius') int? proximityAlertRadius,

  /// Optional. Inline keyboard attached to the message
  @JsonKey(name: 'reply_markup') InlineKeyboardMarkup? replyMarkup,

  /// Optional. Content of the message to be sent instead of the location
  @JsonKey(name: 'input_message_content')
  @InputMessageContentConverter()
  InputMessageContent? inputMessageContent,

  /// Optional. Url of the thumbnail for the result
  @JsonKey(name: 'thumbnail_url') String? thumbnailUrl,

  /// Optional. Thumbnail width
  @JsonKey(name: 'thumbnail_width') int? thumbnailWidth,

  /// Optional. Thumbnail height
  @JsonKey(name: 'thumbnail_height') int? thumbnailHeight,
}) = _InlineQueryResultLocation;