DirectionsRequest class
Settings for route calculation.
origin
and destination
arguments are required.
Constructors
-
DirectionsRequest({required dynamic origin, required dynamic destination, TravelMode? travelMode, bool? optimizeWaypoints, List<
DirectionsWaypoint> ? waypoints, bool? alternatives, bool? avoidTolls, bool? avoidHighways, bool? avoidFerries, bool? avoidIndoor, UnitSystem? unitSystem, String? region, DrivingOptions? drivingOptions, TransitOptions? transitOptions, String? language}) -
const
Properties
- alternatives → bool?
-
If set to
true
, specifies that the Directions service may provide more than one route alternative in the response. Note that providing route alternatives may increase the response time from the server. This is only available for requests without intermediate waypoints.final - avoidFerries → bool?
-
Indicates that the calculated route should avoid ferries.
final
- avoidHighways → bool?
-
Indicates that the calculated route should avoid highways.
final
- avoidIndoor → bool?
-
Indicates that the calculated route should avoid indoor
steps for walking and transit directions.
final
- avoidTolls → bool?
-
Indicates that the calculated route should avoid toll
roads/bridges.
final
- destination → dynamic
-
The address, textual latitude/longitude value, or place ID
to which you wish to calculate directions. The options for
the destination parameter are the same as for the origin
parameter, described above.
final
- drivingOptions → DrivingOptions?
-
Specifies the desired time of departure and/or desired assumption
of time in traffic calculation for
non-transit
TravelMode.final - hashCode → int
-
The hash code for this object.
no setterinherited
- language → String?
-
The language in which to return results
If language is not supplied, the API attempts to use the preferred
language as specified in the Accept-Language header, or the native
language of the domain from which the request is sent.
For a complete list of the supported languages visit
https://developers.google.com/maps/faq#languagesupport
final
- optimizeWaypoints → bool?
-
By default, the Directions service calculates a route through
the provided waypoints in their given order.
final
- origin → dynamic
-
The address, textual latitude/longitude value, or place ID
from which you wish to calculate directions.
final
- region → String?
-
Specifies the region code, specified as a ccTLD
("top-level domain") two-character value.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- transitOptions → TransitOptions?
-
Specifies the desired time of arrival/departure and/or desired
transit types and/or desired routing preference for
transit
TravelMode.final - travelMode → TravelMode?
-
Specifies the mode of transport to use when calculating
directions. Valid values and other request details are
specified in
TravelModes
.final - unitSystem → UnitSystem?
-
Specifies the unit system to use when displaying results.
final
-
waypoints
→ List<
DirectionsWaypoint> ? -
Specifies an array of intermediate locations to include
along the route between the origin and destination points
as pass through or stopover locations. Waypoints alter a
route by directing it through the specified location(s).
The API supports waypoints for these travel modes: driving,
walking and bicycling; not transit.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited