unsubscribe method

void unsubscribe (RouteAware routeAware)

Unsubscribe routeAware.

routeAware is no longer informed about changes to its route. If the given argument was subscribed to multiple types, this will unregister it (once) from each type.

Implementation

void unsubscribe(RouteAware routeAware) {
  assert(routeAware != null);
  for (R route in _listeners.keys) {
    final Set<RouteAware> subscribers = _listeners[route];
    subscribers?.remove(routeAware);
  }
}