Skip to content

Commit

Permalink
chore: minor adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
felangel committed Nov 16, 2024
1 parent 08578e9 commit a6898ea
Showing 1 changed file with 29 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,36 +98,35 @@ class TodosOverviewView extends StatelessWidget {
);
}
}
return ListView.builder(
itemCount: state.filteredTodos.length,
itemBuilder: (_, idx) {
final todo = state.filteredTodos.elementAt(idx);
return TodoListTile(
todo: todo,
onToggleCompleted: (isCompleted) {
context.read<TodosOverviewBloc>().add(
TodosOverviewTodoCompletionToggled(
todo: todo,
isCompleted: isCompleted,
),
);
},
onDismissed: (_) {
context.read<TodosOverviewBloc>().add(
TodosOverviewTodoDeleted(
todo,
),
);
},
onTap: () {
Navigator.of(context).push(
EditTodoPage.route(
initialTodo: todo,
),
);
},
);
},

return CupertinoScrollbar(
child: ListView.builder(
itemCount: state.filteredTodos.length,
itemBuilder: (_, index) {
final todo = state.filteredTodos.elementAt(index);
return TodoListTile(
todo: todo,
onToggleCompleted: (isCompleted) {
context.read<TodosOverviewBloc>().add(
TodosOverviewTodoCompletionToggled(
todo: todo,
isCompleted: isCompleted,
),
);
},
onDismissed: (_) {
context
.read<TodosOverviewBloc>()
.add(TodosOverviewTodoDeleted(todo));
},
onTap: () {
Navigator.of(context).push(
EditTodoPage.route(initialTodo: todo),
);
},
);
},
),
);
},
),
Expand Down

0 comments on commit a6898ea

Please sign in to comment.