Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- AppState appReducer(AppState state, action) => AppState(toDoListReducer(state.toDos, action), listStateReducer(state.listState, action));
- final Reducer<List<ToDoItem>> toDoListReducer = // Boilerplate ignored
- final Reducer<ListState> listStateReducer = combineReducers<ListState>([
- TypedReducer<ListState, DisplayListOnlyAction>(_displayListOnly),
- TypedReducer<ListState, DisplayListWithNewItemAction>(_displayListWithNewItem),
- ]);
- ListState _displayListOnly(ListState listState, DisplayListOnlyAction action) => ListState.listOnly;
- ListState _displayListWithNewItem(ListState listState, DisplayListWithNewItemAction action) => ListState.listWithNewItem;
Add Comment
Please, Sign In to add comment