call method

  1. @override
dynamic call(
  1. Store<S> store,
  2. dynamic action,
  3. NextDispatcher next
)

A Middleware function that intercepts a dispatched action

Implementation

@override
dynamic call(Store<S> store, dynamic action, NextDispatcher next) {
  if (action is ThunkActionWithExtraArgument<S, A>) {
    return action(store, extraArgument);
  } else if (action is CallableThunkActionWithExtraArgument<S, A>) {
    return action.call(store, extraArgument);
  } else {
    return next(action);
  }
}