Skip to content

Commit

Permalink
remove useless code
Browse files Browse the repository at this point in the history
  • Loading branch information
zjuwjf committed Mar 8, 2019
1 parent 6d05a33 commit 5afcf1a
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions example/lib/todo_list_page/list_adapter/reducer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,13 @@ Reducer<PageState> buildReducer() {
PageState _add(PageState state, Action action) {
final ToDoState toDo = action.payload;
final PageState newState = state.clone();
newState.toDos == List<ToDoState>.from(state.toDos);
newState.toDos.add(toDo);
return newState;
}

PageState _remove(PageState state, Action action) {
final String unique = action.payload;
final PageState newState = state.clone();
newState.toDos == List<ToDoState>.from(state.toDos);
newState.toDos.removeWhere((ToDoState state) => state.uniqueId == unique);
return newState;
}

0 comments on commit 5afcf1a

Please sign in to comment.