StreamSinkBase<T> class Null safety

An abstract class that implements StreamSink in terms of onData, onError, and onClose methods.

This takes care of ensuring that events can't be added after close is called or during a call to onStream.

Inheritance
Implemented types
Implementers
Available Extensions
Annotations
  • @Deprecated('Will be removed in the next major release')

Constructors

StreamSinkBase()

Properties

done Future<void>
Return a future which is completed when the StreamSink is finished.
read-onlyoverride
hashCode int
The hash code for this object.
read-onlyinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

add(T data) → void
Adds a data event to the sink.
inherited
addError(Object error, [StackTrace? stackTrace]) → void
Adds an error to the sink.
inherited
addStream(Stream<T> stream) Future<void>
Consumes the elements of stream.
override
close() Future<void>
Closes the sink.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
onAdd(T data) → void
A method that handles data events that are passed to the sink.
visibleForOverriding">@visibleForOverridinginherited
onClose() FutureOr<void>
A method that handles the sink being closed.
visibleForOverriding">@visibleForOverridinginherited
onError(Object error, [StackTrace? stackTrace]) → void
A method that handles error events that are passed to the sink.
visibleForOverriding">@visibleForOverridinginherited
toString() String
A string representation of this object.
inherited

Operators

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