AsyncSignal<T>.fromStream constructor
AsyncSignal<T>.fromStream (
- Stream<
T> stream, { - JoltDebugOption? debug,
Creates an async signal from a Stream.
Parameters:
stream: The stream to wrap
Returns: An AsyncSignal that manages the stream's lifecycle
Example:
final signal = AsyncSignal.fromStream(
Stream.periodic(Duration(seconds: 1), (i) => i)
);
Implementation
factory AsyncSignal.fromStream(Stream<T> stream, {JoltDebugOption? debug}) =>
AsyncSignalImpl(source: StreamSource(stream), debug: debug);