unsubscribe method

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) {
  final List<R> routes = _listeners.keys.toList();
  for (final R route in routes) {
    final Set<RouteAware>? subscribers = _listeners[route];
    if (subscribers != null) {
      if (subscribers.isEmpty) {