|
|
@@ -402,21 +402,12 @@ class HomePage extends BasePage<HomePageController> {
|
|
|
child: taskItemView(
|
|
|
item,
|
|
|
onCheckClick: () {
|
|
|
- controller.agendaList.remove(
|
|
|
- index,
|
|
|
- (context, animation, item) =>
|
|
|
- _buildRemoveTodoItem(context, index, animation, item));
|
|
|
+ controller.agendaComplete(item);
|
|
|
},
|
|
|
),
|
|
|
);
|
|
|
}
|
|
|
|
|
|
- Widget _buildRemoveTodoItem(BuildContext context, int index,
|
|
|
- Animation<double> animation, Agenda item) {
|
|
|
- item.isDone = true;
|
|
|
- return SizeTransition(sizeFactor: animation, child: taskItemView(item));
|
|
|
- }
|
|
|
-
|
|
|
Widget buildTitle(String titleName, VoidCallback? onTap) {
|
|
|
return Padding(
|
|
|
padding: const EdgeInsets.symmetric(horizontal: 12).w,
|
|
|
@@ -500,3 +491,8 @@ class HomePage extends BasePage<HomePageController> {
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+Widget buildRemoveTodoItem(
|
|
|
+ BuildContext context, Animation<double> animation, Agenda item) {
|
|
|
+ return SizeTransition(sizeFactor: animation, child: taskItemView(item));
|
|
|
+}
|