Skip to content

Commit f419a71

Browse files
committed
Call the method from the provider on long press of a tile
1 parent c1772c7 commit f419a71

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/widgets/task_tile.dart

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ class TaskTile extends StatelessWidget {
1111
@override
1212
Widget build(BuildContext context) {
1313
return ListTile(
14-
onLongPress: () {},
14+
onLongPress: () {
15+
Provider.of<TaskData>(context, listen: false).deleteTask(task);
16+
},
1517
title: Text(
1618
task.name,
1719
style: TextStyle(

0 commit comments

Comments
 (0)