connect method

void connect(
  1. K key,
  2. Stream<V> stream
)

Connect a stream to a key in the map.

Changes from the connected stream are propagated as a MapUpdate to attached listeners.

Implementation

void connect(K key, Stream<V> stream) {
  disconnect(key);
  _streamsSubscriptions[key] = stream.listen((value) => this[key] = value);
}