InputMessageContent.location constructor
const
InputMessageContent.location({
- @JsonKey(name: 'latitude') required double latitude,
- @JsonKey(name: 'longitude') required double longitude,
- @JsonKey(name: 'live_period') int? livePeriod,
- @JsonKey(name: 'horizontal_accuracy') int? horizontalAccuracy,
- @JsonKey(name: 'heading') int? heading,
- @JsonKey(name: 'proximity_alert_radius') int? proximityAlertRadius,
Represents the content of a location message to be sent as the result of an inline query.
Implementation
const factory InputMessageContent.location({
/// Latitude of the location in degrees
@JsonKey(name: 'latitude') required final double latitude,
/// Longitude of the location in degrees
@JsonKey(name: 'longitude') required final double longitude,
/// Optional. Period in seconds for which the location can be updated,
/// should be between 60 and 86400.
@JsonKey(name: 'live_period') final int? livePeriod,
/// Optional. The radius of uncertainty for the location, measured in
/// meters, 0-1500
@JsonKey(name: 'horizontal_accuracy') final int? horizontalAccuracy,
/// 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') final 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') final int? proximityAlertRadius,
}) = InputLocationMessageContent;