addListener method

void addListener (
  1. VoidCallback listener
)
inherited

Calls the listener every time the value of the animation changes.

Listeners can be removed with removeListener.

Implementation

void addListener(VoidCallback listener) {
  didRegisterListener();
  _listeners.add(listener);
}