ValueConnectableStream<T> constructor

ValueConnectableStream<T>(
  1. Stream<T> source,
  2. {bool sync: false}
)

Constructs a Stream which only begins emitting events when the connect method is called, this Stream acts like a BehaviorSubject.

Implementation

factory ValueConnectableStream(Stream<T> source, {bool sync = false}) =>
    ValueConnectableStream<T>._(
      source,
      BehaviorSubject<T>(sync: sync),
    );