StreamSourceController<T> class
Isolation wrapper for StreamController with dispose
- Implemented types
- Implementers
Constructors
-
StreamSourceController(StreamController<
T> eventStreamController) -
const
Properties
- done → Future
-
A future which is completed when the stream controller is done
sending events.
no setteroverride
-
eventStreamController
→ StreamController<
T> -
Internal event stream controller
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- hasListener → bool
-
Whether there is a subscriber on the Stream.
no setteroverride
- isClosed → bool
-
Whether the stream controller is closed for adding more events.
no setteroverride
- isPaused → bool
-
Whether the subscription would need to buffer events.
no setteroverride
- onCancel ↔ FutureOr Function()?
-
The callback which is called when the stream is canceled.
getter/setter pairoverride
- onListen ↔ void Function()?
-
The callback which is called when the stream is listened to.
getter/setter pairoverride
- onPause ↔ void Function()?
-
The callback which is called when the stream is paused.
getter/setter pairoverride
- onResume ↔ void Function()?
-
The callback which is called when the stream is resumed.
getter/setter pairoverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
sink
→ StreamSink<
T> -
Returns a view of this object that only exposes the StreamSink interface.
no setteroverride
-
stream
→ Stream<
T> -
The stream that this controller is controlling.
no setteroverride
Methods
-
add(
T event) → void -
Sends a data
event.override -
addError(
Object error, [StackTrace? stackTrace]) → void -
Sends or enqueues an error event.
override
-
addStream(
Stream< T> source, {bool? cancelOnError}) → Future -
Receives events from
sourceand puts them into this controller's stream.override -
close(
) → Future -
Closes the stream.
override
-
dispose(
) → Future< void> - Dispose controller.
-
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.
override