addObserver method
Registers the given object as a binding observer. Binding observers are notified when various application events occur, for example when the system locale changes. Generally, one element in the element tree registers itself as a binding observer, and converts the system state into inherited elements.
See also:
- removeObserver, to release the resources reserved by this method.
- ElementsBindingObserver, which has an example of using this method.
Implementation
void addObserver(ElementsBindingObserver observer) => _observers.add(observer);