Location class
Properties
accuracy
→ double
The estimated horizontal accuracy of the location in meters.
final
altitude
→ double
The altitude of the device in meters.
final
hashCode
→ int
The hash code for this object.
no setter inherited
heading
→ double
The heading in which the device is traveling in degrees.
final
isEmpty
→ bool
no setter
isNotEmpty
→ bool
no setter
latitude
→ double
The latitude of this location in degrees normalized to the interval -90.0 to +90.0 (both inclusive).
final
longitude
→ double
The longitude of the location in degrees normalized to the interval -180 (exclusive) to +180 (inclusive).
final
mocked
→ bool
Indicate if location was created from a mock provider.
final
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
speed
→ double
The speed at which the devices is traveling in meters per second over ground.
final
speedAccuracy
→ double
The estimated speed accuracy of this location, in meters per second.
final
timestamp
→ DateTime
The time at which this location was determined.
final
Methods
copyWith ({double ? latitude , double ? longitude , double ? accuracy , double ? altitude , double ? heading , double ? speed , double ? speedAccuracy , DateTime ? timestamp , bool ? mocked })
→ Location
distanceTo ({double ? latitude , double ? longitude , Location ? location })
→ double
Using Haversine formula
fastDistanceTo ({double ? latitude , double ? longitude , Location ? location })
→ double
Using Euclidean formula
fromJsonList (List ? jsonList )
→ List <Location > ?
inherited
fromJsonMap (Map <String , dynamic > ? json )
→ Location ?
override
fromJsonString (String ? json )
→ Location ?
inherited
fromJsonStringList (String ? jsonStringList )
→ List <Location > ?
inherited
isDifferentThan (Location ? location )
→ bool
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson ()
→ Map <String , dynamic >
override
toJsonMap ()
→ Map <String , dynamic >
inherited
toJsonString ()
→ String
inherited
toString ()
→ String
This is just to suggest children to implement a named constructor to
support creating objects fromJson(...) and fromJsonString(...) as easy as
T.build().fromJson(...) or T.build().fromJsonString(...)
inherited