dispose method

FutureOr<void> dispose()
inherited

Tears down this listener.

The default implementation orchestrates nativeClear then clearListeners. Subclasses with extra teardown work, or those that implements EventHandler (and therefore cannot inherit this body), must override this and preserve the same call order.

Implementation

FutureOr<void> dispose() {
  nativeClear();
  clearListeners();
}