ASink that supports adding errors.
This makes it suitable for capturing the results of asynchronouscomputations, which can complete with a value or an error.
TheEventSink has been designed to handle asynchronous events fromStreams. See, for example,Stream.eventTransformed which usesEventSinks to transform events.
- Implemented types
- Sink<
T>
- Sink<
- Implementers
Properties
- 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(
Tevent)→ void - Adds a data
eventto the sink.override - addError(
Objecterror, [StackTrace?stackTrace])→ void - Adds an
errorto the sink. - close(
)→ void - Closes the sink.override
- noSuchMethod(
Invocationinvocation)→ dynamic - Invoked when a nonexistent method or property is accessed.inherited
- toString(
)→String - A string representation of this object.inherited
Operators
- operator ==(
Objectother)→bool - The equality operator.inherited