watch method

StreamSubscription<T> watch(
  1. ZenithRef ref,
  2. Stream<T> stream
)

Subscribes to stream and writes each event to this node, guarding every mutation with ref's lifecycle.

Equivalent to ref.watchStream(this, stream).

Implementation

StreamSubscription<T> watch(ZenithRef ref, Stream<T> stream) {
  return ref.watchStream(this, stream);
}