LocationUpdate class

Represents a single location update with coordinates and metadata.

This immutable model contains latitude, longitude, altitude, accuracy, and the timestamp when the location was captured.

Constructors

LocationUpdate({required double latitude, required double longitude, double? altitude, double? accuracy, double? heading, double? speed, int? timestampMs})
Creates a location update.
const

Properties

accuracy → double?
Horizontal accuracy in meters (lower is better)
final
altitude → double?
Altitude in meters above sea level
final
hashCode → int
The hash code for this object.
no setteroverride
heading → double?
Heading/bearing in degrees [0, 360)
final
latitude → double
Latitude in degrees -90, 90
final
longitude → double
Longitude in degrees -180, 180
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
speed → double?
Speed in meters per second
final
timestampMs → int
Unix timestamp in milliseconds when location was captured
final

Methods

distanceTo(LocationUpdate other) → double
Calculates distance in meters to another location using Haversine formula.
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