addListener method

  1. @override
void addListener (
  1. VoidCallback listener
)
inherited

Register a closure to be called when the object changes.

This method must not be called after dispose has been called.

Implementation

@override
void addListener(VoidCallback listener) {
  assert(_debugAssertNotDisposed());
  _listeners.add(listener);
}