go method

void go(
  1. String to
)

Sets the current route to to if guard allows it.

Clears the whole routes stack.

Implementation

void go(String to) {
  arguments = null;

  for (var e in routes) {
    if (e != '/' && e != to) {
      _accounted.add(e);
    }
  }

  routes.value = [_guarded(to)];
  notifyListeners();
}