EventHandler<Event, State> typedef

EventHandler<Event, State> = FutureOr<void> Function(Event event, Emitter<State> emit)

An event handler is responsible for reacting to an incoming Event and can emit zero or more states via the Emitter.

Implementation

typedef EventHandler<Event, State> = FutureOr<void> Function(
  Event event,
  Emitter<State> emit,
);