Location class final

Represents a location on earth by latitude and longitude and other optional information

Constructors

Location.new({required double latitude, required double longitude, double? altitude, double? horizontalAccuracy, double? verticalAccuracy, double? course, double? speed, DateTime? timestamp, int? floorLevel})
Creates a location
const

Properties

altitude double?
The altitude of the location in meters above the WGS 84 reference ellipsoid. Null if the altitude is not available.
final
course double?
The direction in which the device is traveling, measured in degrees and relative to due north. Value ranges from 0.0 to 359.99. Null if the course is not available.
final
floorLevel int?
The floor level in buildings, relative to the building model. For example, if you are on the first floor, the value would be 1. Null if the floor level is not available or if the device is not in a building.
final
hashCode int
The hash code for this object.
no setteroverride
horizontalAccuracy double?
The accuracy of the horizontal coordinate in meters. Represents the radius of uncertainty for the location's latitude and longitude. Null if the horizontal accuracy is not available.
final
latitude double
The latitude of the location
final
longitude double
The longitude of the location
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
speed double?
The instantaneous speed of the device in meters per second. Null if the speed is not available.
final
timestamp DateTime?
The timestamp at which this location data was generated. Null if the timestamp is not available.
final
verticalAccuracy double?
The accuracy of the vertical coordinate (altitude) in meters. Represents the vertical accuracy of the altitude property. Null if the vertical accuracy is not available.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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

Constants

empty → const Location
Represents an empty or undefined location