withEvent<TEvent extends ApplicationEvent> method

void withEvent<TEvent extends ApplicationEvent>({
  1. required dynamic handler(
    1. TEvent
    ),
  2. bool passesCriteria(
    1. TEvent
    )?,
  3. String? scopeId,
})

Implementation

void withEvent<TEvent extends ApplicationEvent>(
        {required Function(TEvent) handler,
        bool Function(TEvent)? passesCriteria,
        String? scopeId}) =>
    entries.add(EventSubscriptionEntry.create(handler, scopeId: scopeId));