Position class

Contains detailed location information.

Inheritance

Constructors

Position({double longitude, double latitude, DateTime timestamp, bool mocked, double accuracy, double altitude, double heading, double speed, double speedAccuracy})
Constructs an instance with the given values for testing. Position instances constructed this way won't actually reflect any real information from the platform, just whatever was passed in at construction time.

Properties

accuracy double
The estimated horizontal accuracy of the position in meters. [...]
final
altitude double
The altitude of the device in meters. [...]
final
hashCode int
The hash code for this object. [...]
read-only, override
heading double
The heading in which the device is traveling in degrees. [...]
final
latitude double
The latitude of this position in degrees normalized to the interval -90.0 to +90.0 (both inclusive).
final
longitude double
The longitude of the position in degrees normalized to the interval -180 (exclusive) to +180 (inclusive).
final
mocked bool
Indicate if position was created from a mock provider. [...]
final
props List<Object>
The List of props (properties) which will be used to determine whether two Equatables are equal.
read-only, override
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 position, in meters per second. [...]
final
timestamp DateTime
The time at which this position was determined.
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
stringify bool
If the value is true, the toString method will be overrided to print the equatable props.
read-only, inherited

Methods

toJson() Map<String, dynamic>
Converts the Position instance into a Map instance that can be serialized to JSON.
toString() String
Returns a string representation of this object.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited

Operators

operator ==(Object o) bool
The equality operator. [...]
override

Static Methods

fromMap(dynamic message) Position
Converts the supplied Map to an instance of the Position class.
fromMaps(dynamic message) List<Position>
Converts a collection of Map objects into a collection of Position objects.