dispose method

void dispose()

Removes every listener.

Call this only when the signal is owned by a component that is being removed. Shared/global signals usually should not be disposed by a page.

Implementation

void dispose() {
  _listeners.clear();
}