manageActionSubscription method

  1. @mustCallSuper
  2. @protected
void manageActionSubscription(
  1. ActionSubscription subscription
)
inherited

Registers an ActionSubscription to be canceled when the store is disposed.

This supports the following pattern for consumers:

manageActionSubscription(myAction.listen(_myHandler));

Implementation

@mustCallSuper
@protected
void manageActionSubscription(ActionSubscription subscription) {
  getManagedDisposer(() async => subscription.cancel());
}