addListener abstract method

bool addListener(
  1. K key,
  2. VoidCallback listener
)

Returns true if key was not already used for another listener.

If another listener was previously associated with key, then the only one gets replaced with listener and false gets returned.

Implementation

bool addListener(K key, VoidCallback listener);