checkRouteFromStep method

bool checkRouteFromStep(
  1. int step,
  2. bool checker(
    1. RouteState<Object?> routeState
    )
)

Checks a RouteState at a relative position from the current one without performing navigation. The step determines the direction and distance (e.g., -1 for the previous route,1 for the next).

Returns the result of the checker or

Implementation

bool checkRouteFromStep(
  int step,
  bool Function(RouteState routeState) checker,
) {
  final index = pNavigationState.getValue().index + step;
  return checkRouteFromIndex(index, checker);
}