pushNamed static method
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);
}
}