distanceWithAddress method
Future<DistanceResponse>
distanceWithAddress(
- List<
String> origin, - List<
String> destination, { - TravelMode? travelMode,
- String? languageCode,
- bool alternative = false,
- String? region,
- @Deprecated("[avoid] is deprecated, use [avoids] instead.") RouteType? avoid,
- List<
RouteType> avoids = const <RouteType>[], - Unit? unit,
- Object? arrivalTime,
- Object? departureTime,
- List<
TransitMode> transitMode = const [], - TrafficModel? trafficModel,
- TransitRoutingPreferences? transitRoutingPreference,
Implementation
Future<DistanceResponse> distanceWithAddress(
List<String> origin,
List<String> destination, {
TravelMode? travelMode,
String? languageCode,
bool alternative = false,
String? region,
@Deprecated("[avoid] is deprecated, use [avoids] instead.")
RouteType? avoid,
List<RouteType> avoids = const <RouteType>[],
Unit? unit,
Object? /*DateTime|num*/ arrivalTime,
Object? /*DateTime|num|String('now')*/ departureTime,
List<TransitMode> transitMode = const [],
TrafficModel? trafficModel,
TransitRoutingPreferences? transitRoutingPreference,
}) async {
if (avoid != null) {
avoids = [
...avoids,
avoid,
];
}
return _distance(
origin,
destination,
travelMode: travelMode,
languageCode: languageCode,
alternative: alternative,
region: region,
avoids: avoids,
unit: unit,
arrivalTime: arrivalTime,
departureTime: departureTime,
transitMode: transitMode,
trafficModel: trafficModel,
transitRoutingPreference: transitRoutingPreference,
);
}