Location class abstract
This object represents a point on the map.
- Annotations
-
- @freezed
Constructors
- Location.new({@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
constfactory
-
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
-
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