streams library

Classes

AbstractConnectableStream<T, S extends Subject<T>, R extends Stream<T>>
Base class for implementations of ConnectableStream. S is type of the forwarding Subject. R is return type of autoConnect and refCount (type constraint: S extends R).
CombineLatestStream<T, R>
Merges the given Streams into one Stream sequence by using the combiner function whenever any of the source stream sequences emits an item.
ConcatEagerStream<T>
Concatenates all of the specified stream sequences, as long as the previous stream sequence terminated successfully.
ConcatStream<T>
Concatenates all of the specified stream sequences, as long as the previous stream sequence terminated successfully.
ConnectableStream<T>
A ConnectableStream resembles an ordinary Stream, except that it can be listened to multiple times and does not begin emitting items when it is listened to, but only when its connect method is called.
ConnectableStreamSubscription<T>
A special StreamSubscription that not only cancels the connection to the source Stream, but also closes down a subject that drives the Stream.
DeferStream<T>
The defer factory waits until a listener subscribes to it, and then it creates a Stream with the given factory function.
ForkJoinStream<T, R>
This operator is best used when you have a group of streams and only care about the final emitted value of each. One common use case for this is if you wish to issue multiple requests on page load (or some other event) and only want to take action when a response has been received for all.
FromCallableStream<T>
Returns a Stream that, when listening to it, calls a function you specify and then emits the value returned from that function.
MergeStream<T>
Flattens the items emitted by the given streams into a single Stream sequence.
NeverStream<T>
Returns a non-terminating stream sequence, which can be used to denote an infinite duration.
PublishConnectableStream<T>
A ConnectableStream that converts a single-subscription Stream into a broadcast Stream.
RaceStream<T>
Given two or more source streams, emit all of the items from only the first of these streams to emit an item or notification.
RangeStream
Returns a Stream that emits a sequence of Integers within a specified range.
RepeatStream<T>
Creates a Stream that will recreate and re-listen to the source Stream the specified number of times until the Stream terminates successfully.
ReplayConnectableStream<T>
A ConnectableStream that converts a single-subscription Stream into a broadcast Stream that replays emitted items to any new listener, and provides synchronous access to the list of emitted values.
ReplayStream<T>
An Stream that provides synchronous access to the emitted values
RetryStream<T>
Creates a Stream that will recreate and re-listen to the source Stream the specified number of times until the Stream terminates successfully.
RetryWhenStream<T>
Creates a Stream that will recreate and re-listen to the source Stream when the notifier emits a new value. If the source Stream emits an error or it completes, the Stream terminates.
SequenceEqualStream<S, T>
Determine whether two Streams emit the same sequence of items. You can provide an optional equals handler to determine equality.
SwitchLatestStream<T>
Convert a Stream that emits Streams (aka a 'Higher Order Stream') into a single Stream that emits the items emitted by the most-recently-emitted of those Streams.
TimerStream<T>
Emits the given value after a specified amount of time.
UsingStream<T, R>
When listener listens to it, creates a resource object from resource factory function, and creates a Stream from the given factory function and resource as argument. Finally when the stream finishes emitting items or stream subscription is cancelled (call StreamSubscription.cancel or Stream.listen(cancelOnError: true)), call the disposer function on resource object. The disposer is called after the future returned from StreamSubscription.cancel completes.
ValueConnectableStream<T>
A ConnectableStream that converts a single-subscription Stream into a broadcast Stream that replays the latest value to any new listener, and provides synchronous access to the latest emitted value.
ValueStream<T>
A Stream that provides synchronous access to the last emitted value (aka. data event).
ZipStream<T, R>
Merges the specified streams into one stream sequence using the given zipper Function whenever all of the stream sequences have produced an element at a corresponding index.

Extensions

ConcatExtensions on Stream<T>
Extends the Stream class with the ability to concatenate one stream with another.
ConnectableStreamExtensions on Stream<T>
Extends the Stream class with the ability to transform a single-subscription Stream into a ConnectableStream.
ErrorAndStackTracesReplayStreamExtension on ReplayStream<T>
Extension method on ReplayStream to access the emitted ErrorAndStackTraces.
ErrorAndStackTraceValueStreamExtension on ValueStream<T>
Extension method on ValueStream to access the last emitted ErrorAndStackTrace.
LastEventValueStreamExtensions on ValueStream<T>
Extension methods on ValueStream related to lastEventOrNull.
MergeExtension on Stream<T>
Extends the Stream class with the ability to merge one stream with another.
ZipWithExtension on Stream<T>
Extends the Stream class with the ability to zip one Stream with another.

Exceptions / Errors

ValueStreamError
The error throw by ValueStream.value or ValueStream.error.