unsubscribe method

bool unsubscribe(
  1. State<StatefulWidget> state
)

Remove the State object as a route observer.

Implementation

bool unsubscribe(State state) {
  final subscribed = state is RouteAware;
  if (subscribed) {
    routeObserver.unsubscribe(state as RouteAware);
  }
  return subscribed;
}