asyncMap<S> method

EventSubscriptionBuilder<S> asyncMap<S>(
  1. Future<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> asyncMap<S>(Future<S> Function(T event) mapper) {
  return _AsyncMapEventSubscriptionBuilder(parent: this, mapper: mapper);
}