google_maps_directions library

Functions

directionsFromJson(String str) Directions
directionsToJson(Directions data) String
distance(double lat1, double lng1, double lat2, double lng2, {String? googleAPIKey}) Future<DistanceValue>
Get the shortest distance according to Google Maps between this two points.
distanceInMeters(double lat1, double lng1, double lat2, double lng2, {String? googleAPIKey}) Future<int>
Get the shortest distance (in meters) according to Google Maps between this two points.
distanceText(double lat1, double lng1, double lat2, double lng2, {String? googleAPIKey}) Future<String>
Get the shortest route distance (text) according to Google Maps between this two points.
duration(double lat1, double lng1, double lat2, double lng2, {String? googleAPIKey}) Future<DurationValue>
Get the shortest route leg duration according to Google Maps between this two points.
durationInSeconds(double lat1, double lng1, double lat2, double lng2, {String? googleAPIKey}) Future<int>
Get the shortest route leg duration in seconds according to Google Maps between this two points.
durationText(double lat1, double lng1, double lat2, double lng2, {String? googleAPIKey}) Future<String>
Get the shortest route duration as a text according to Google Maps between this two points.
getDirections(double lat1, double lng1, double lat2, double lng2, {String? googleAPIKey, String? mode, String? language}) Future<Directions>
Get the shortest route according to Google Maps between this two points.
shortestLeg(double lat1, double lng1, double lat2, double lng2, {String? googleAPIKey}) Future<DirectionRouteLeg>
Get the shortest route leg according to Google Maps between this two points.
shortestRoute(double lat1, double lng1, double lat2, double lng2, {String? googleAPIKey}) Future<DirectionRoute>
Get the shortest route according to Google Maps between this two points.
sort<T extends AddressPointMixin>(double originLat, double originLng, List<T> points, {String? googleAPIKey, bool asc = true}) Future<List<T>>
Sort list of points from their distance to one point (ascendant or descendant)

Exceptions / Errors

DirectionsException
Custom class for exceptions.