unsubscribe method

bool unsubscribe(
  1. EventHandler<T> handler
)

Removes a handler previously added to this Event.

Returns true if handler was in list, false otherwise. This method has no effect if the handler is not in the list.

See also the - shorcut version.

Implementation

bool unsubscribe(EventHandler<T> handler) {
  return _handlers.remove(handler);
}