StreamSinkCompleter< T> class
A sink where the destination is provided later.
The sink is a normal sink that you can add events to to immediately, but until setDestinationSink is called, the events will be buffered.
The same effect can be achieved by using a StreamController and adding it
to the sink using Sink.addStream
when the destination sink is ready. This
class attempts to shortcut some of the overhead when possible. For example,
if the sink only has events added after the destination sink has been set,
those events are added directly to the sink.
Constructors
Properties
-
sink
→ StreamSink<
T> -
The sink for this completer. [...]
final
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
setDestinationSink(
StreamSink< T> destinationSink) → void - Sets a sink as the destination for events from the StreamSinkCompleter's sink. [...]
-
setError(
dynamic error, [ StackTrace stackTrace ]) → void -
Completes this to a closed sink whose
Sink.done
future emitserror
. [...] -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
toString(
) → String -
Returns a string representation of this object.
inherited
Operators
-
operator ==(
dynamic other) → bool -
The equality operator. [...]
inherited
Static Methods
-
fromFuture<
T>( Future< StreamSink< T>> sinkFuture) → StreamSink< T> -
Convert a
Future<StreamSink>
to aStreamSink
. [...]