futurePendingReducer<State, Action> static method

State futurePendingReducer<State, Action>(
  1. State prevState,
  2. FuturePendingAction<Action> action
)

A default reducer to handle FuturePendingAction, which can only be used with a State extending FutureState.

For usage without FutureState, please check pendingReducer and FutureReducer.pendingReducer.

Implementation

static State futurePendingReducer<State, Action>(
    State prevState, FuturePendingAction<Action> action) {
  if (prevState is FutureState) {
    return prevState.updateOnPending(action) as State;
  }
  throw ArgumentError.notNull(
      "State is not FutureState and Custom PendingReducer is null");
}