isTripActive static method

bool isTripActive({
  1. TaskHandler? taskHandler,
})

Active trip status (navigation or simulation).

Checks whether any trip session (navigation or simulation) is currently active. Returns true if either startNavigation or startSimulation has been called and the session is still running.

Parameters

  • taskHandler: Optional handler for the trip session. If omitted, checks the global active state.

Returns

  • (bool) True if navigation or simulation is active, false otherwise.

See also:

Implementation

static bool isTripActive({final TaskHandler? taskHandler}) {
  final OperationResult result = staticMethod(
    'NavigationService',
    'isTripActive',
    args: taskHandler ?? <dynamic, dynamic>{},
  );
  return result['result'];
}