StreamSinkBase<T> class abstract

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

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

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.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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 nonexistent method or property is accessed.
inherited
onAdd(T data) → void
A method that handles data events that are passed to the sink.
inherited
onClose() FutureOr<void>
A method that handles the sink being closed.
inherited
onError(Object error, [StackTrace? stackTrace]) → void
A method that handles error events that are passed to the sink.
inherited
toString() String
A string representation of this object.
inherited

Operators

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