calculateDistance method

double calculateDistance(
  1. double startLatitude,
  2. double startLongitude,
  3. double endLatitude,
  4. double endLongitude,
)

Calculate distance between two locations

Implementation

double calculateDistance(
  double startLatitude,
  double startLongitude,
  double endLatitude,
  double endLongitude,
) {
  return Geolocator.distanceBetween(
    startLatitude,
    startLongitude,
    endLatitude,
    endLongitude,
  );
}