StreamBridge<T> class
final
Mirrors a source while forwarding demand and owning both cancellation paths.
This neutral relay preserves non-terminal source errors. It has no queue
budget; use BoundedStreamBridge when a producer cannot be paused safely.
Constructors
-
StreamBridge({required Stream<
T> source, bool subscribeOnFirstListen = false, void onFirstListen()?, void onSourceDone()?, void onSourceError(Object, StackTrace)?, void onConsumerCancel()?, void onCancelFailed(Object, StackTrace)?}) -
Mirrors
source. Eager subscription is the default; a cold operation can opt intosubscribeOnFirstListen. Hooks run before forwarding the event.
Properties
Methods
-
cancelSource(
) → void - Stops the source without ending the output.
-
close(
) → void - Ends the relay, without waiting for arbitrary source cleanup.
-
fail(
Object error, [StackTrace? stackTrace]) → void - Ends the relay with a terminal owner-supplied failure.
-
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