unsubscribe method Null safety

void unsubscribe (
  1. 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.


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