removeObserver method

bool removeObserver(
  1. WidgetsBindingObserver observer
)

Unregisters the given observer. This should be used sparingly as it is relatively expensive (O(N) in the number of registered observers).

See also:

Implementation

bool removeObserver(WidgetsBindingObserver observer) {
  if (observer == _backGestureObserver) {
    _backGestureObserver = null;
  }
  return _observers.remove(observer);
}