cancelStreamSubscriptions method

void cancelStreamSubscriptions()

Cancel all stream subscriptions added.

It is fine to call this method and then add additional subscriptions.

Implementation

void cancelStreamSubscriptions() {
  for (final subscription in _subscriptions) {
    unawaited(subscription.cancel());
  }
  _subscriptions.clear();
}