emit method

  1. @protected
bool emit(
  1. ControlEvent event
)

Dispatches event, reporting whether anything answered it.

The answer is what a platform listener wants back, to say whether what it delivered was handled. Dispatches nothing while stopped, so a listener that outlives stop is inert rather than wrong.

Implementation

@protected
bool emit(ControlEvent event) {
  final dispatch = _dispatch;
  if (dispatch == null) return false;
  return dispatch(event);
}