removeObserver method
Unregisters the given observer. This should be used sparingly as it is relatively expensive (O(N) in the number of registered observers).
See also:
- addObserver, for the method that adds observers in the first place.
- WidgetsBindingObserver, which has an example of using this method.
Implementation
bool removeObserver(WidgetsBindingObserver observer) => _observers.remove(observer);