allEventHandlers method

List<EventStream> allEventHandlers()

Returns all currently initialized event handlers.

Only handlers that were already created are included — null ones are skipped. The returned list is a snapshot and modifying it does not affect the component.

Useful for bulk operations such as closing, pausing, or debugging active listeners.

Implementation

List<EventStream> allEventHandlers() {
  return [
    if (_onClick != null) _onClick!,
    if (_onChange != null) _onChange!,
    if (_onKeyPress != null) _onKeyPress!,
    if (_onKeyUp != null) _onKeyUp!,
    if (_onKeyDown != null) _onKeyDown!,
    if (_onMouseOver != null) _onMouseOver!,
    if (_onMouseOut != null) _onMouseOut!,
    if (_onLoad != null) _onLoad!,
    if (_onError != null) _onError!,
    if (_onGenerate != null) _onGenerate!,
  ];
}