Location constructor
const
Location({
- @JsonKey(name: 'longitude') required double longitude,
- @JsonKey(name: 'latitude') required double latitude,
- @JsonKey(name: 'horizontal_accuracy') double? horizontalAccuracy,
- @JsonKey(name: 'live_period') int? livePeriod,
- @JsonKey(name: 'heading') int? heading,
- @JsonKey(name: 'proximity_alert_radius') int? proximityAlertRadius,
Constructs a Location object
Implementation
const factory Location({
/// Longitude as defined by sender
@JsonKey(name: 'longitude') required double longitude,
/// Latitude as defined by sender
@JsonKey(name: 'latitude') required double latitude,
/// The radius of uncertainty for the location, measured in meters; 0-1500
@JsonKey(name: 'horizontal_accuracy') double? horizontalAccuracy,
/// Optional. Time relative to the message sending date, during which the
/// location can be updated; in seconds. For active live locations only.
@JsonKey(name: 'live_period') int? livePeriod,
/// Optional. The direction in which user is moving, in degrees; 1-360. For
/// active live locations only.
@JsonKey(name: 'heading') int? heading,
/// Optional. The maximum distance for proximity alerts about approaching
/// another chat member, in meters. For sent live locations only.
@JsonKey(name: 'proximity_alert_radius') int? proximityAlertRadius,
}) = _Location;