PausableStream<T> class


Pausable Stream

A stream wrapper that allows pausing and resuming of event flow.

Example:

final pausable = myStream.asPausable();
pausable.stream.listen((data) => print(data));
// Pause or resume as needed:
pausable.pause();
pausable.resume();

Constructors

PausableStream(Stream<T> _source)
Creates a PausableStream that wraps the _source stream.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stream Stream<T>
The pausable stream that emits events from the source.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pause() → void
Pauses the stream so that events from the source are held until resumed.
resume() → void
Resumes the stream, releasing any buffered events.
toString() String
A string representation of this object.
inherited

Operators

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