onEvent method

  1. @override
  2. @visibleForTesting
  3. @protected
void onEvent(
  1. HakoEvent event
)

Handles a HakoEvent by adding it to the event sink if one is available.

Events are forwarded to the current event sink, allowing subscribers to receive notifications about Hako events. If no sink is available (e.g., if openEventStream hasn't been called or closeEventStream has been called), the event is silently ignored and no error is thrown.

event The event to be processed and forwarded to subscribers.

Implementation

@override
@visibleForTesting
@protected
void onEvent(HakoEvent event) => _eventStreamPair?.sink.add(event);