addListener method

void addListener (void listener)

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);
}