addSubscription method
- @Deprecated('Subscriptions are now managed by the Disposable mixin. $v3Deprecation')
- StreamSubscription subscription
inherited
Register a subscription
that should be canceled when the component
unmounts. Cancellation will be handled automatically by
componentWillUnmount
.
Implementation
@Deprecated(
'Subscriptions are now managed by the Disposable mixin. $v3Deprecation')
void addSubscription(StreamSubscription subscription) {
getManagedDisposer(subscription.cancel);
}