triggerOnAction method

  1. @deprecated
dynamic triggerOnAction(
  1. ActionV2 action, [
  2. void onAction(
    1. dynamic payload
    )?
])
inherited

A convenience method for listening to an action and triggering automatically once the callback for said action has completed.

If onAction is provided, it will be called every time action is dispatched. If onAction returns a Future, trigger will not be called until that future has resolved.

If the Store has been disposed, this method throws a StateError. Deprecated: 2.9.5 To be removed: 3.0.0

Implementation

@deprecated
triggerOnAction(ActionV2 action, [void onAction(payload)?]) {
  triggerOnActionV2(action, onAction);
}