LocationCoordinate class
A geographic coordinate with latitude and longitude.
Uses the WGS84 coordinate system (same as GPS).
const sanFrancisco = LocationCoordinate(
latitude: 37.7749,
longitude: -122.4194,
);
final distance = sanFrancisco.distanceTo(newYork);
print('Distance: ${distance.inKilometers} km');
- Annotations
-
- @immutable
Constructors
- LocationCoordinate({required double latitude, required double longitude})
-
const
Properties
Methods
-
distanceTo(
LocationCoordinate other) → Distance -
The distance to
other. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override