Distance class

Implemented types
Implementers

Constructors

Distance({DistanceAlgorithm algorithm = const Haversine(), bool isRound = true})
const
Distance.withRadius(double radius, {DistanceAlgorithm algorithm = const Haversine(), bool isRound = true})

Properties

algorithm DistanceAlgorithm
final
hashCode int
The hash code for this object.
no setterinherited
isRound bool
final
radius double
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

bearing(dynamic position, dynamic destination) double
Returns the great circle bearing (direction) in degrees to the next point (p2)
call(dynamic position, dynamic destination, {LengthUnit unit = LengthUnit.M}) num
Shortcut for distance
distance(dynamic position, dynamic destination, {LengthUnit unit = LengthUnit.M}) double
Computes the distance between two points.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
offset(dynamic from, double? distanceInMeter, double bearing) LatLng
Returns a destination point based on the given distance and bearing
override
toString() String
A string representation of this object.
inherited

Operators

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