off method

void off([
  1. String? event,
  2. String? reference
])

Removes one or more previously attached event listeners.

Both parameters are optional: if no reference is given, all listeners for the given event are removed; if no event is given, then all event listeners attached to the instance are removed.

Implementation

void off([String? event, String? reference]) =>
    _dispatcher.off(event, reference);