LimitedStreamController<T> class

A specialized StreamController that limits the no. of elements that can be in the stream.

Constructors

LimitedStreamController(int _limit, {void onListen()?, void onCancel()?, bool sync = false})
Creates a new LimitedStreamController that limits the no. of elements that can be in the queue.

Properties

done Future
no setter
hashCode int
The hash code for this object.
no setterinherited
hasListener bool
no setter
isClosed bool
no setter
isPaused bool
no setter
length int
Returns the no. of elements waiting in the stream.
no setter
onCancel ControllerCancelCallback?
getter/setter pair
onListen ControllerCallback?
getter/setter pair
onPause ControllerCallback?
getter/setter pair
onResume ControllerCallback?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sink StreamSink<T>
@Throwing(UnsupportedError)
no setter
stream Stream<T>
no setter

Methods

addError(Object error, [StackTrace? stackTrace]) → void
addStream(Stream<T> source, {bool? cancelOnError = true}) Future<bool>
@Throwing(UnsupportedError)
asyncAdd(T event) Future<void>
Add an event to the stream. If the stream is full then this method will wait until there is room.
close() Future
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