addObserver method

dynamic addObserver(
  1. Observer observer
)

Add observer

Implementation

addObserver(Observer observer) {
  if (!_checkContains(observer)) {
    observers.add(observer);
  }
}