addListener method

void addListener(
  1. GetStream<T> rxGetx
)

This is an internal method. Subscribe to changes on the inner stream.

Implementation

void addListener(GetStream<T> rxGetx) {
  if (!_subscriptions.containsKey(rxGetx)) {
    final subs = rxGetx.listen((data) {
      if (!subject.isClosed) subject.add(data);
    });
    final listSubscriptions =
        _subscriptions[rxGetx] ??= <StreamSubscription>[];
    listSubscriptions.add(subs);
  }
}