asDistinctValueConnectableStream method
Convert the this DistinctValueStream into a DistinctValueConnectableStream
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.
This is useful for converting a single-subscription stream into a broadcast Stream, that also provides access to the latest value synchronously.
Implementation
DistinctValueConnectableStream<T> asDistinctValueConnectableStream(
{bool sync = true}) {
final self = this;
return self is DistinctValueConnectableStream<T>
? self
: DistinctValueConnectableStream<T>(this, value,
equals: equals, sync: sync);
}