StreamCloser<T> class Null safety

A StreamTransformer that allows the caller to forcibly close the transformed Stream.

When close is called, any stream (or streams) transformed by this transformer that haven't already completed or been cancelled will emit a done event and cancel their underlying subscriptions.

Note that unlike most StreamTransformers, each instance of StreamCloser has its own state (whether or not it's been closed), so it's a good idea to construct a new one for each use unless you need to close multiple streams at the same time.

Inheritance
Annotations

Constructors

StreamCloser()

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
isClosed bool
Whether close has been called.
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

bind(Stream<T> stream) Stream<T>
Transforms the provided stream. [...]
override
cast<RS, RT>() StreamTransformer<RS, RT>
Provides a StreamTransformer<RS, RT> view of this stream transformer. [...]
inherited
close() Future<void>
Closes all transformed streams. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited