popRoute static method

void popRoute(
  1. int index
)

pops the current route from a specific navigator stack by passing the index of the navigator stack to pop from.

Implementation

static void popRoute(int index) {
  NavigatorState? currentState;
  currentState = _keys[index].currentState;
  if (currentState != null && currentState.canPop()) {
    currentState.pop();
  }
}