EventSink abstract class
A Sink that supports adding errors.
This makes it suitable for capturing the results of asynchronous computations, which can complete with a value or an error.
The EventSink has been designed to handle asynchronous events from Streams. See, for example, Stream.eventTransformed
which uses EventSink
s to transform events.
- Implements
-
- Sink<T>
- Implemented by
Constructors
Properties
- hashCode → int read-only, inherited
-
The hash code for this object.
- runtimeType → Type read-only, inherited
-
A representation of the runtime type of the object.
Operators
- operator ==(
other) → bool inherited -
The equality operator.
Methods
- add(
T event) → void -
Adds a data
event
to the sink. - addError(
Object error, [ StackTrace stackTrace ]) → void -
Adds an
error
to the sink. - close(
) → void -
Closes the sink.
- noSuchMethod(
Invocation invocation) → dynamic inherited -
Invoked when a non-existent method or property is accessed.
- toString(
) → String inherited -
Returns a string representation of this object.
© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/1.24.3/dart-async/EventSink-class.html