ConnectableStreamExtensions<T> extension

Extends the Stream class with the ability to transform a single-subscription Stream into a ConnectableStream.

on

Methods

publish() PublishConnectableStream<T>

Available on Stream<T>, provided by the ConnectableStreamExtensions extension

Convert the current Stream into a ConnectableStream that can be listened to multiple times. It will not begin emitting items from the original Stream until the connect method is invoked.
publishReplay({int? maxSize}) ReplayConnectableStream<T>

Available on Stream<T>, provided by the ConnectableStreamExtensions extension

Convert the current Stream into a ReplayConnectableStream that can be listened to multiple times. It will not begin emitting items from the original Stream until the connect method is invoked.
publishValue() ValueConnectableStream<T>

Available on Stream<T>, provided by the ConnectableStreamExtensions extension

Convert the current Stream into a ValueConnectableStream that can be listened to multiple times. It will not begin emitting items from the original Stream until the connect method is invoked.
publishValueSeeded(T seedValue) ValueConnectableStream<T>

Available on Stream<T>, provided by the ConnectableStreamExtensions extension

Convert the current Stream into a ValueConnectableStream that can be listened to multiple times, providing an initial seeded value. It will not begin emitting items from the original Stream until the connect method is invoked.
share() Stream<T>

Available on Stream<T>, provided by the ConnectableStreamExtensions extension

Convert the current Stream into a new Stream that can be listened to multiple times. It will automatically begin emitting items when first listened to, and shut down when no listeners remain.
shareReplay({int? maxSize}) ReplayStream<T>

Available on Stream<T>, provided by the ConnectableStreamExtensions extension

Convert the current Stream into a new ReplayStream that can be listened to multiple times. It will automatically begin emitting items when first listened to, and shut down when no listeners remain.
shareValue() ValueStream<T>

Available on Stream<T>, provided by the ConnectableStreamExtensions extension

Convert the current Stream into a new ValueStream that can be listened to multiple times. It will automatically begin emitting items when first listened to, and shut down when no listeners remain.
shareValueSeeded(T seedValue) ValueStream<T>

Available on Stream<T>, provided by the ConnectableStreamExtensions extension

Convert the current Stream into a new ValueStream that can be listened to multiple times, providing an initial value. It will automatically begin emitting items when first listened to, and shut down when no listeners remain.