push method

void push(
  1. String to
)

Pushes to to the routes stack.

Implementation

void push(String to) {
  arguments = null;
  int pageIndex = routes.indexWhere((e) => e == to);
  if (pageIndex != -1) {
    while (routes.length - 1 > pageIndex) {
      pop();
    }
  } else {
    routes.add(_guarded(to));
  }

  notifyListeners();
}