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
-
- Object
- EventSinkBase<
T> - StreamSinkBase
- Implemented types
-
- StreamSink<
T>
- StreamSink<
- Implementers
- Available extensions
- Annotations
-
- @Deprecated('Will be removed in the next major release')
Constructors
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
-
rejectErrors(
) → StreamSink< T> -
Available on StreamSink<
Returns a StreamSink that forwards toT> , provided by the StreamSinkExtensions extensionthis
but rejects errors. -
toString(
) → String -
A string representation of this object.
inherited
-
transform<
S> (StreamSinkTransformer< S, T> transformer) → StreamSink<S> -
Available on StreamSink<
Transforms a StreamSink usingT> , provided by the StreamSinkExtensions extensiontransformer
.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited