From 8a89dbf1ca46849995f117227ac29ad2f4f508cf Mon Sep 17 00:00:00 2001 From: Abhishek Date: Mon, 18 Dec 2023 18:46:05 +0530 Subject: [PATCH 1/3] update theme --- lib/widgets/add_Task.dart | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/lib/widgets/add_Task.dart b/lib/widgets/add_Task.dart index acbc0a4c..12c89b4d 100644 --- a/lib/widgets/add_Task.dart +++ b/lib/widgets/add_Task.dart @@ -321,8 +321,12 @@ class _AddTaskBottomSheetState extends State { if (formKey.currentState!.validate()) { if (due == null) { ScaffoldMessenger.of(context).showSnackBar(SnackBar( - content: const Text( - 'Due date cannot be empty. Please select a due date.'), + content: Text( + 'Due date cannot be empty. Please select a due date.', + style: TextStyle( + color: AppSettings.isDarkMode ? Colors.white : Colors.black, + ), + ), backgroundColor: AppSettings.isDarkMode ? Colors.black : Colors.white, duration: const Duration(seconds: 2), @@ -343,7 +347,12 @@ class _AddTaskBottomSheetState extends State { widgetController.fetchAllData(); ScaffoldMessenger.of(context).showSnackBar(SnackBar( - content: const Text('Task Added Successfully, Tap to Edit'), + content: Text( + 'Task Added Successfully, Tap to Edit', + style: TextStyle( + color: AppSettings.isDarkMode ? Colors.white : Colors.black, + ), + ), backgroundColor: AppSettings.isDarkMode ? Colors.black : Colors.white, duration: const Duration(seconds: 2), @@ -360,7 +369,12 @@ class _AddTaskBottomSheetState extends State { } } on FormatException catch (e) { ScaffoldMessenger.of(context).showSnackBar(SnackBar( - content: Text(e.message), + content: Text( + e.message, + style: TextStyle( + color: AppSettings.isDarkMode ? Colors.white : Colors.black, + ), + ), backgroundColor: AppSettings.isDarkMode ? const Color.fromARGB(255, 61, 61, 61) : const Color.fromARGB(255, 39, 39, 39), From 2a65dea60f8ab04513260329378e45078089edc5 Mon Sep 17 00:00:00 2001 From: Abhishek Date: Mon, 18 Dec 2023 18:50:07 +0530 Subject: [PATCH 2/3] remove cancel from dialog box --- lib/widgets/buildTasks.dart | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/lib/widgets/buildTasks.dart b/lib/widgets/buildTasks.dart index 5a75b2ec..01e8df2e 100644 --- a/lib/widgets/buildTasks.dart +++ b/lib/widgets/buildTasks.dart @@ -184,12 +184,6 @@ class _TasksBuilderState extends State { }, child: const Text('No'), ), - TextButton( - onPressed: () { - Navigator.of(context).pop(); - }, - child: const Text('Cancel'), - ), ], ); }, @@ -242,12 +236,6 @@ class _TasksBuilderState extends State { }, child: const Text('No'), ), - TextButton( - onPressed: () { - Navigator.of(context).pop(); - }, - child: const Text('Cancel'), - ), ], ); }, From d3975b9baef00c80275def8be546ef9a1d18f7ea Mon Sep 17 00:00:00 2001 From: Abhishek Date: Mon, 18 Dec 2023 19:05:21 +0530 Subject: [PATCH 3/3] autofocus in add task --- lib/widgets/add_Task.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/widgets/add_Task.dart b/lib/widgets/add_Task.dart index 12c89b4d..077e4c71 100644 --- a/lib/widgets/add_Task.dart +++ b/lib/widgets/add_Task.dart @@ -88,6 +88,7 @@ class _AddTaskBottomSheetState extends State { } Widget buildName() => TextFormField( + autofocus: true, controller: namecontroller, style: TextStyle( color: AppSettings.isDarkMode ? Colors.white : Colors.black,