Guest User

Untitled

a guest
Apr 23rd, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. AppState appReducer(AppState state, action) => AppState(toDoListReducer(state.toDos, action), listStateReducer(state.listState, action));
  2.  
  3. final Reducer<List<ToDoItem>> toDoListReducer = // Boilerplate ignored
  4. final Reducer<ListState> listStateReducer = combineReducers<ListState>([
  5. TypedReducer<ListState, DisplayListOnlyAction>(_displayListOnly),
  6. TypedReducer<ListState, DisplayListWithNewItemAction>(_displayListWithNewItem),
  7. ]);
  8.  
  9. ListState _displayListOnly(ListState listState, DisplayListOnlyAction action) => ListState.listOnly;
  10.  
  11. ListState _displayListWithNewItem(ListState listState, DisplayListWithNewItemAction action) => ListState.listWithNewItem;
Add Comment
Please, Sign In to add comment