getDirections function
Get the shortest route according to Google Maps between this two points.
@throw DirectionsException.
Implementation
Future<Directions> getDirections(
double lat1,
double lng1,
double lat2,
double lng2, {
String? googleAPIKey,
String? mode,
String? language,
}) async {
return await DirectionsRepository().get(
origin: AddressPoint(lat: lat1, lng: lng1),
destination: AddressPoint(lat: lat2, lng: lng2),
googleAPIKey: googleAPIKey ?? GoogleMapsDirections.googleApiKey,
mode: mode,
language: language,
);
}