cancelNavigation static method

void cancelNavigation([
  1. TaskHandler? taskHandler
])

Cancels the active navigation.

If a route calculation is in progress, the provided callback will be triggered first with GemError.cancel.

Parameters

  • IN navigationListener Navigation listener used to identify the navigation session. If no listener is provided then the active navigation session will be cancelled.

Throws

  • An exception if it fails.

Implementation

static void cancelNavigation([final TaskHandler? taskHandler]) {
  if (taskHandler != null) {
    taskHandler as TaskHandlerImpl;

    staticMethod('NavigationService', 'stopNavigation', args: taskHandler.id);
  } else {
    staticMethod('NavigationService', 'stopNavigation');
  }
}