call method
State
call(
- State prevState,
- dynamic action
The Reducer
function that converts the current state and action into a
new state
Implementation
State call(State prevState, dynamic action) {
if (action is FutureSucceededAction<Action, Payload>) {
return successReducer(prevState, action);
}
if (action is FuturePendingAction<Action>) {
return pendingReducer(prevState, action);
}
if (action is FutureFailedAction<Action>) {
return failedReducer(prevState, action);
}
return prevState;
}