suspend method

Future<NavigationStatus> suspend({
  1. String? reason,
  2. Map<String, dynamic>? extra,
})

Stop motion but remember the current goal, including the current waypoint and loop setting for routes. A suspended goal must be canceled before a new one can start.

// Example:
final status = await myNavigationService.suspend(reason: 'door closed');

For more information, see the navigation service docs.

Implementation

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