executePlan method

Future<NavigationStatus> executePlan(
  1. Plan plan, {
  2. Map<String, dynamic>? extra,
})

Drive a Plan, typically one from planToPoint or planToLocation. While navigating, the active path is available on getNavigationStatus. Rejected if the plan's path is empty.

// Example:
final status = await myNavigationService.executePlan(plan);

For more information, see the navigation service docs.

Implementation

Future<NavigationStatus> executePlan(Plan plan, {Map<String, dynamic>? extra}) async {
  final request = ExecutePlanRequest(name: name, plan: plan, extra: extra?.toStruct());
  final response = await client.executePlan(request, options: callOptions);
  return response.status;
}