accepts method

bool accepts(
  1. Event event
)

Implementation

bool accepts(Event event) =>
    event is T && !event.isCanceled && (type == null || type == event.type);