doOnListen method

Stream<T> doOnListen(
  1. void onListen(
      )
    )

    Invokes the given callback function when the stream is first listened to.

    Example

    Stream.fromIterable([1])
      .doOnListen(() => print('Is someone there?'))
      .listen(null); // prints 'Is someone there?'
    

    Implementation

    Stream<T> doOnListen(void Function() onListen) =>
        DoStreamTransformer<T>(onListen: onListen).bind(this);