From 45bc4c2af51eb6208971918371ccef91f54c8f5e Mon Sep 17 00:00:00 2001 From: Aniket Singh <31aniket.singh@gmail.com> Date: Mon, 20 Jun 2022 14:05:59 +0530 Subject: [PATCH] onTab changed to onTap --- .../todo-list/flutter-todo-list/lib/screens/todo.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/todo-list/flutter-todo-list/lib/screens/todo.dart b/examples/todo-list/flutter-todo-list/lib/screens/todo.dart index 1d1c0f8cf9e..7c88411a7d8 100644 --- a/examples/todo-list/flutter-todo-list/lib/screens/todo.dart +++ b/examples/todo-list/flutter-todo-list/lib/screens/todo.dart @@ -101,7 +101,7 @@ class _TodoPageState extends State { Future displayTextInputDialog({ required BuildContext context, - void Function()? onTab, + void Function()? onTap, required TextEditingController taskCtrl, }) async { return showDialog( @@ -119,7 +119,7 @@ class _TodoPageState extends State { ), smallGap, MaterialButton( - onPressed: onTab, + onPressed: onTap, child: const Text( 'Add Task', style: TextStyle( @@ -170,7 +170,7 @@ class _TodoPageState extends State { displayTextInputDialog( context: context, taskCtrl: _taskEditingController, - onTab: () async { + onTap: () async { await editTask( id: todos[index]['id'].toString(), task: _taskEditingController.text, @@ -270,7 +270,7 @@ class _TodoPageState extends State { displayTextInputDialog( context: context, taskCtrl: _taskEditingController, - onTab: () async { + onTap: () async { await addTodo( task: _taskEditingController.text, );