bindStream method Null safety

void bindStream(
  1. Stream<T> stream

Binds an existing Stream<T> to this Rx to keep the values in sync. You can bind multiple sources to update the value. Closing the subscription will happen automatically when the observer Widget (GetX or Obx) gets unmounted from the Widget tree.


void bindStream(Stream<T> stream) {
  final listSubscriptions =
      _subscriptions[subject] ??= <StreamSubscription>[];
  listSubscriptions.add(stream.listen((va) => value = va));