unsubscribe method

void unsubscribe(
  1. AutoRouteAware routeAware
)

Unsubscribe AutoRouteAware.

AutoRouteAware 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(AutoRouteAware routeAware) {
  for (final route in _listeners.keys) {
    final Set<AutoRouteAware>? subscribers = _listeners[route];
    subscribers?.remove(routeAware);
  }
}