LocationSetRadius class

Use this class to include or exclude circular areas with a given center and given radius. The latter is defined in kilometers. If not specified, radius defaults to 25 km.

Constructors

LocationSetRadius(double longitude, double latitude, [double radius = kDefaultRadius])
const
LocationSetRadius.fromJson(List data)

Properties

hashCode int
The hash code for this object.
no setterinherited
latitude double
final
longitude double
final
radius double
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

contains(double lon, double lat) bool
Returns true if the given location is inside the area. Calculates the distance using the Haversine algorithm. Accuracy can be out by 0.3%.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() List<double>
toString() String
A string representation of this object.
inherited

Operators

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

Constants

kDefaultRadius → const double