directions method
Future<DirectionsResponse>
directions(
- Object origin,
- Object destination, {
- TravelMode? travelMode,
- List<
Waypoint> waypoints = const [], - bool alternatives = false,
- @deprecated RouteType? avoid,
- List<
RouteType> avoids = const [], - String? language,
- Unit? units,
- String? region,
- Object? arrivalTime,
- Object? departureTime,
- List<
TransitMode> transitMode = const [], - TrafficModel? trafficModel,
- TransitRoutingPreferences? transitRoutingPreference,
Implementation
Future<DirectionsResponse> directions(
Object /*Location|String*/ origin,
Object /*Location|String*/ destination, {
TravelMode? travelMode,
List<Waypoint> waypoints = const [],
bool alternatives = false,
@deprecated RouteType? avoid,
List<RouteType> avoids = const [],
String? language,
Unit? units,
String? region,
Object? /*DateTime|num*/ arrivalTime,
Object? /*DateTime|num|String('now')*/ departureTime,
List<TransitMode> transitMode = const [],
TrafficModel? trafficModel,
TransitRoutingPreferences? transitRoutingPreference,
}) async {
final url = buildUrl(
origin: origin,
destination: destination,
travelMode: travelMode,
waypoints: waypoints,
alternatives: alternatives,
avoids: avoids,
language: language,
units: units,
region: region,
arrivalTime: arrivalTime,
departureTime: departureTime,
transitMode: transitMode,
trafficModel: trafficModel,
transitRoutingPreference: transitRoutingPreference,
);
return _decode(await doGet(url, headers: apiHeaders));
}