StreamPureExtensions<T> extension

on

Methods

asBroadcast() Stream<T>
Returns a broadcast stream without wrapping it unnecessarily.
asStream() Stream<T>
Returns itself with the Stream type useful when you don't want the ValueStream type.
distinctRuntimeType() Stream<T>
Stream.distinct by T.runtimeType
dumpErrorToConsoleDart() Stream<T>
firstRuntimeType<R>({R orElse()?}) Future<R>
firstType<R>({R orElse()?}) Future<R>
listenValueChanges<R>({Duration debounceTime = const Duration(), bool equals(T previous, T current)?, void onStart(T previous, T current)?, required Stream<R> onData(T previous, T current), void onFinish(T previous, T current, R result)?, Function? onError, void onDone()?}) StreamSubscription
Allows you to provide a function that will be executed whenever a value changes. Listen for changes in the stream and call onStart. onData is called, with the previous value and the current value, after a debounceTime and only if the value has changed does it return a result which is passed to onFinish.