subscribeFunction method

EventSubscription subscribeFunction(
  1. FutureOr<void> handler(
    1. T event
    )
)

Subscribes to the given handler.

This finalizes the builder and applies all the steps before subscribing.

Implementation

EventSubscription subscribeFunction(
  FutureOr<void> Function(T event) handler,
) {
  return subscribe(EventHandler.function(handler));
}