addSubscription method

  1. @Deprecated('Subscriptions are now managed by the Disposable mixin. $v3Deprecation')
void addSubscription(
  1. 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);
}