addListener method

  1. @override
void addListener(
  1. VoidParameterCallback listener
)
override

Return a Listenable that triggers when any of the given Listenables themselves trigger.

The list must not be changed after this method has been called. Doing so will lead to memory leaks or exceptions.

The list may contain nulls; they are ignored. Register a closure to be called when the object notifies its listeners.

Implementation

@override
void addListener(VoidParameterCallback listener) {
  assert(_debugAssertNotDisposed());
  _listeners!.add(_ListenerEntry(listener));  }