PublishConnectableStream<T> constructor

PublishConnectableStream<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 PublishSubject.

Implementation

factory PublishConnectableStream(Stream<T> source, {bool sync = false}) {
  return PublishConnectableStream<T>._(source, PublishSubject<T>(sync: sync));
}