Position class
Contains detailed location information.
- Annotations
Constructors
- Position.new({required double longitude, required double latitude, required DateTime timestamp, required double accuracy, required double altitude, required double altitudeAccuracy, required double heading, required double headingAccuracy, required double speed, required double speedAccuracy, int? floor, bool isMocked = false})
-
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.
const
Properties
- accuracy → double
-
The estimated horizontal accuracy of the position in meters.
final
- altitude → double
-
The altitude of the device in meters.
final
- altitudeAccuracy → double
-
The estimated vertical accuracy of the position in meters.
final
- floor → int?
-
The floor specifies the floor of the building on which the device is
located.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- heading → double
-
The heading in which the device is traveling in degrees.
final
- headingAccuracy → double
-
The estimated heading accuracy of the position in degrees.
final
- isMocked → bool
-
Will be true on Android (starting from API lvl 18) when the location came
from the mocked provider.
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
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- 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
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts the Position instance into a Map instance that can be serialized to JSON.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override