StreamSinkCompleter<T> class
Null safety
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
- hashCode → int
-
The hash code for this object.
read-onlyinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
-
sink
→ StreamSink<
T> -
The sink for this completer.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
setDestinationSink(
StreamSink< T> destinationSink) → void - Sets a sink as the destination for events from the StreamSinkCompleter's sink.
-
setError(
Object error, [StackTrace? stackTrace]) → void -
Completes this to a closed sink whose
Sink.done
future emitserror
. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromFuture<
T> (Future< StreamSink< sinkFuture) → StreamSink<T> >T> -
Convert a
Future<StreamSink>
to aStreamSink
.