EventSinkBase<T> class Null safety

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

This takes care of ensuring that events can't be added after close is called.

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

Constructors

EventSinkBase()

Properties

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.
override
addError(Object error, [StackTrace? stackTrace]) → void
Adds an error to the sink.
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">@visibleForOverriding
onClose() FutureOr<void>
A method that handles the sink being closed.
visibleForOverriding">@visibleForOverriding
onError(Object error, [StackTrace? stackTrace]) → void
A method that handles error events that are passed to the sink.
visibleForOverriding">@visibleForOverriding
toString() String
A string representation of this object.
inherited

Operators

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