getBetterRouteTimeDistanceToFork static method

TimeDistance getBetterRouteTimeDistanceToFork({
  1. TaskHandler? taskHandler,
})

Better route fork point time and distance.

Returns the estimated time (in seconds) and distance (in meters) from the current position to the point where a detected better route diverges from the current navigation route. Only meaningful when a better route has been detected via the onBetterRouteDetected callback.

Parameters

  • taskHandler: Optional handler for the navigation session. If omitted, the active session is used.

Returns

  • (TimeDistance) Time (seconds) and distance (meters) to fork point.

See also:

Implementation

static TimeDistance getBetterRouteTimeDistanceToFork({
  final TaskHandler? taskHandler,
}) {
  final OperationResult result = staticMethod(
    'NavigationService',
    'getBetterRouteTimeDistanceToFork',
    args: taskHandler ?? <dynamic, dynamic>{},
  );

  return TimeDistance.fromJson(result['result']);
}