planToLocation method
- String locationName, {
- NavigationPosition? start,
- Map<
String, dynamic> ? extra,
Compute a Plan to a saved location without moving. Accepts the same optional start as planToPoint.
Throws if no path exists.
// Example:
final plan = await myNavigationService.planToLocation('kitchen');
For more information, see the navigation service docs.
Implementation
Future<Plan> planToLocation(String locationName, {NavigationPosition? start, Map<String, dynamic>? extra}) async {
final request = PlanToLocationRequest(name: name, locationName: locationName, start: start, extra: extra?.toStruct());
final response = await client.planToLocation(request, options: callOptions);
return response.plan;
}