Distance.withRadius constructor
Distance.withRadius(
- double radius, {
- bool roundResult = true,
- DistanceCalculator calculator = const Vincenty(),
Radius must be greater than 0.
Implementation
Distance.withRadius(final double radius,
{final bool roundResult = true,
final DistanceCalculator calculator = const Vincenty()})
: _radius = radius,
_roundResult = roundResult,
_calculator = calculator {
if (radius <= 0) {
throw ArgumentError.value(
radius, 'radius', 'Radius must be greater than 0');
}
}