map<S> method

EventSubscriptionBuilder<S> map<S>(
  1. S mapper(
    1. T event
    )
)

Transforms each event.

It extends the current builder by converting the input T using the provided mapper function into output S. Only events of type S will reach the EventHandler.

Implementation

EventSubscriptionBuilder<S> map<S>(S Function(T event) mapper) {
  return _MapEventSubscriptionBuilder(parent: this, mapper: mapper);
}