EventReader<T> class final

A cursor-based reader over an EventChannel.

Each call to drain returns the events sent since the previous call and advances this reader's cursor to the channel's current end.

Properties

hashCode int
The hash code for this object.
no setterinherited
hasUnread bool
Whether unread events are available for this reader.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

consume() bool
Consumes unread events and reports whether any existed.
drain() List<T>
Returns and consumes all events this reader has not yet seen.
forEach(void callback(T event)) → void
Invokes callback for every unread event without allocating a result list, then advances this reader's cursor.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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