registerStreamSubscription<S> method

  1. @protected
void registerStreamSubscription<S>(
  1. StreamSubscription<S> subscription
)

Registers a StreamSubscription to be automatically cancelled when the dispose method is called.

Implementation

@protected
void registerStreamSubscription<S>(StreamSubscription<S> subscription) {
  final newValue = _registeredSubscriptions.add(subscription);
  assert(
    newValue,
    'attempted to registed the same StreamSubscription twice: $subscription',
  );
}