Location class abstract

This object represents a point on the map.

Available extensions
Annotations
  • @freezed

Constructors

Location({@JsonKey.new(name: 'longitude') required double longitude, @JsonKey.new(name: 'latitude') required double latitude, @JsonKey.new(name: 'horizontal_accuracy') double? horizontalAccuracy, @JsonKey.new(name: 'live_period') int? livePeriod, @JsonKey.new(name: 'heading') int? heading, @JsonKey.new(name: 'proximity_alert_radius') int? proximityAlertRadius})
Constructs a Location object
const
factory
Location.fromJson(Map<String, dynamic> json)
Constructs a Location object from a JSON map
factory

Properties

copyWith → $LocationCopyWith<Location>
Create a copy of Location with the given fields replaced by the non-null parameter values.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
heading → int?
Optional. The direction in which user is moving, in degrees; 1-360. For active live locations only.
no setterinherited
horizontalAccuracy → double?
The radius of uncertainty for the location, measured in meters; 0-1500
no setterinherited
latitude → double
Latitude as defined by sender
no setterinherited
livePeriod → int?
Optional. Time relative to the message sending date, during which the location can be updated; in seconds. For active live locations only.
no setterinherited
longitude → double
Longitude as defined by sender
no setterinherited
proximityAlertRadius → int?
Optional. The maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

map<TResult extends Object?>(TResult $default(_Location value)) → TResult

Available on Location, provided by the LocationPatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>(TResult? $default(_Location value)?) → TResult?

Available on Location, provided by the LocationPatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>(TResult $default(_Location value)?, {required TResult orElse()}) → TResult

Available on Location, provided by the LocationPatterns extension

A variant of map that fallback to returning orElse.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Serializes this Location to a JSON map.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited