listenTo<T> method

StreamSubscription<T> listenTo<T>(
  1. dynamic eventHandler(
    1. T
    )
)

Implementation

StreamSubscription<T> listenTo<T>(Function(T) eventHandler) {
  return where((e) => e is T).map((e) => e as T).listen(eventHandler);
}