pushNamed static method

void pushNamed(
  1. String route,
  2. int x
)

Use this method to programmatically push a route to a specific navigator stack by passing the route name and the index of the navigator stack

Implementation

static void pushNamed(String route, int x) {
  NavigatorState? currentState;
  currentState = _keys[x].currentState;
  if (currentState != null) {
    currentState.pushNamed(route);
  }
}