isInsideRadius static method
bool
isInsideRadius(
- LatLng location,
- LatLng fromCenter,
- double radius, {
- DistanceAlgorithmType algorithm = DistanceAlgorithmType.Haversine,
- LengthUnit unit = LengthUnit.M,
Implementation
static bool isInsideRadius(
LatLng location,
LatLng fromCenter,
double radius, {
DistanceAlgorithmType algorithm = DistanceAlgorithmType.Haversine,
LengthUnit unit = LengthUnit.M,
}) {
double distance = distanceBetween(
fromCenter,
location,
algorithm: algorithm,
unit: unit,
);
return distance <= radius;
}