LocationData class

Represents a geographical location in the real world.

Constructors

LocationData.fromJson(Map<String, dynamic> json)
Creates a new LocationData instance from a JSON map, as produced by toJson. This round-trips with toJson.
factory
LocationData.fromMap(Map<String, dynamic> dataMap)
Creates a new LocationData instance from a map.
factory

Properties

accuracy double?
Estimated horizontal accuracy of this location, radial, in meters
final
altitude double?
In meters above the WGS 84 reference ellipsoid. Derived from GPS informations.
final
elapsedRealtimeNanos double?
Return the time of this fix, in elapsed real-time since system boot. Only available on Android https://developer.android.com/reference/android/location/Location#getElapsedRealtimeNanos()
final
elapsedRealtimeUncertaintyNanos double?
Get estimate of the relative precision of the alignment of the ElapsedRealtimeNanos timestamp. Only available on Android https://developer.android.com/reference/android/location/Location#getElapsedRealtimeUncertaintyNanos()
final
hashCode int
The hash code for this object.
no setteroverride
heading double?
Heading is the horizontal direction of travel of this device, in degrees
final
headingAccuracy double?
Get the estimated bearing accuracy of this location, in degrees. Only available on Android https://developer.android.com/reference/android/location/Location#getBearingAccuracyDegrees()
final
isMock bool?
Is the location currently mocked
final
isProducedByAccessory bool?
Whether the location was produced by a connected accessory, such as an external GPS receiver.
final
latitude double
Latitude in degrees
final
longitude double
Longitude, in degrees
final
provider String?
The name of the provider that generated this fix. Only available on Android https://developer.android.com/reference/android/location/Location#getProvider()
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
satelliteNumber int?
The number of satellites used to derive the fix. Only available on Android https://developer.android.com/reference/android/location/Location#getExtras()
final
speed double?
In meters/second
final
speedAccuracy double?
In meters/second
final
time double?
timestamp of the LocationData
final
verticalAccuracy double?
Estimated vertical accuracy of altitude, in meters.
final

Methods

copyWith({double? latitude, double? longitude, double? accuracy, double? verticalAccuracy, double? altitude, double? speed, double? speedAccuracy, double? heading, double? time, bool? isMock, bool? isProducedByAccessory, double? headingAccuracy, double? elapsedRealtimeNanos, double? elapsedRealtimeUncertaintyNanos, int? satelliteNumber, String? provider}) LocationData
Returns a copy of this LocationData with the given fields replaced by the new values. Any argument left null keeps the current value.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts this LocationData into a JSON map. This round-trips with LocationData.fromJson.
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override