DistinctValueConnectableStream<T> constructor
DistinctValueConnectableStream<T> (})
Constructs a Stream which only begins emitting events when
the connect method is called, this Stream acts like a
ValueSubject
and distinct until changed.
Data events are skipped if they are equal to the previous data event.
Equality is determined by the provided equals
method. If that is omitted,
the '==' operator on the last provided data element is used.
Implementation
factory DistinctValueConnectableStream(
Stream<T> source,
T seedValue, {
bool Function(T previous, T next)? equals,
bool sync = true,
}) =>
_DistinctValueConnectableStream<T>._(
source,
DistinctValueSubject(seedValue, sync: sync, equals: equals),
equals,
);