ZenithStreamX extension

Adds stream subscription helpers to ZenithRef.

Use watchStream to bind a Stream to an AsyncValue node. The stream subscription is automatically cancelled when the ref's scope is disposed.

on

Methods

watchStream<T>(ZenithNode<AsyncValue<T>> node, Stream<T> stream) → StreamSubscription<T>

Available on ZenithRef, provided by the ZenithStreamX extension

Subscribes to stream and writes each event to node as AsyncData.