registerStreamSubscription<S> method
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',
);
}