From 539135bbcc3f6448dc729b3f41d869b843d47a00 Mon Sep 17 00:00:00 2001 From: Arjav Patel Date: Thu, 9 Jan 2025 20:55:01 +0530 Subject: [PATCH 1/5] Fixed The Issue --- .../home/controllers/home_controller.dart | 8 +++ .../home/views/add_task_bottom_sheet.dart | 72 ++++++++++++------- 2 files changed, 53 insertions(+), 27 deletions(-) diff --git a/lib/app/modules/home/controllers/home_controller.dart b/lib/app/modules/home/controllers/home_controller.dart index 1068f829..38f53fdc 100644 --- a/lib/app/modules/home/controllers/home_controller.dart +++ b/lib/app/modules/home/controllers/home_controller.dart @@ -508,7 +508,15 @@ class HomeController extends GetxController { final projectcontroller = TextEditingController(); var due = Rxn(); RxString dueString = ''.obs; + final priorityList = ['H', 'M', 'L','X']; + final priorityColors = [ + TaskWarriorColors.red, + TaskWarriorColors.yellow, + TaskWarriorColors.green, + TaskWarriorColors.grey + ]; RxString priority = 'M'.obs; + final tagcontroller = TextEditingController(); RxList tags = [].obs; RxBool inThePast = false.obs; diff --git a/lib/app/modules/home/views/add_task_bottom_sheet.dart b/lib/app/modules/home/views/add_task_bottom_sheet.dart index a1364610..9e08077e 100644 --- a/lib/app/modules/home/views/add_task_bottom_sheet.dart +++ b/lib/app/modules/home/views/add_task_bottom_sheet.dart @@ -367,34 +367,52 @@ class AddTaskBottomSheet extends StatelessWidget { ), textAlign: TextAlign.left, ), + const SizedBox(width: 2,), Obx( - () => DropdownButton( - dropdownColor: AppSettings.isDarkMode - ? TaskWarriorColors.kdialogBackGroundColor - : TaskWarriorColors.kLightDialogBackGroundColor, - value: homeController.priority.value, - elevation: 16, - style: GoogleFonts.poppins( - color: AppSettings.isDarkMode - ? TaskWarriorColors.white - : TaskWarriorColors.black, - ), - underline: Container( - height: 1.5, - color: AppSettings.isDarkMode - ? TaskWarriorColors.kdialogBackGroundColor - : TaskWarriorColors.kLightDialogBackGroundColor, - ), - onChanged: (String? newValue) { - homeController.priority.value = newValue!; - }, - items: ['H', 'M', 'L', 'None'] - .map>((String value) { - return DropdownMenuItem( - value: value, - child: Text(' $value'), - ); - }).toList(), + () => Row( + children: [ + for(int i=0;i Date: Thu, 9 Jan 2025 21:02:28 +0530 Subject: [PATCH 2/5] Re-configured the sequence of the priority --- lib/app/modules/home/controllers/home_controller.dart | 11 +++++++---- pubspec.lock | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/app/modules/home/controllers/home_controller.dart b/lib/app/modules/home/controllers/home_controller.dart index 38f53fdc..9e143437 100644 --- a/lib/app/modules/home/controllers/home_controller.dart +++ b/lib/app/modules/home/controllers/home_controller.dart @@ -508,12 +508,15 @@ class HomeController extends GetxController { final projectcontroller = TextEditingController(); var due = Rxn(); RxString dueString = ''.obs; - final priorityList = ['H', 'M', 'L','X']; + final priorityList = ['L','X','M','H']; final priorityColors = [ - TaskWarriorColors.red, - TaskWarriorColors.yellow, TaskWarriorColors.green, - TaskWarriorColors.grey + TaskWarriorColors.grey, + TaskWarriorColors.yellow, + TaskWarriorColors.red, + + + ]; RxString priority = 'M'.obs; diff --git a/pubspec.lock b/pubspec.lock index 27c534e7..90d1a52e 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -106,7 +106,7 @@ packages: source: hosted version: "7.2.11" built_collection: - dependency: transitive + dependency: "direct main" description: name: built_collection sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" From af0aa65208f40cfa9ae665a79dec6a561e308ddf Mon Sep 17 00:00:00 2001 From: Arjav Patel Date: Thu, 9 Jan 2025 21:03:37 +0530 Subject: [PATCH 3/5] Re-configured the sequence of the priority --- lib/app/modules/home/controllers/home_controller.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/app/modules/home/controllers/home_controller.dart b/lib/app/modules/home/controllers/home_controller.dart index 9e143437..53074874 100644 --- a/lib/app/modules/home/controllers/home_controller.dart +++ b/lib/app/modules/home/controllers/home_controller.dart @@ -518,7 +518,7 @@ class HomeController extends GetxController { ]; - RxString priority = 'M'.obs; + RxString priority = 'X'.obs; final tagcontroller = TextEditingController(); RxList tags = [].obs; From eb072e18341d7f56e623fcaa7bec3c8e600bde06 Mon Sep 17 00:00:00 2001 From: Arjav Patel Date: Sat, 11 Jan 2025 16:22:27 +0530 Subject: [PATCH 4/5] Re-configured the sequence of the priority --- .../detailRoute/controllers/detail_route_controller.dart | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/app/modules/detailRoute/controllers/detail_route_controller.dart b/lib/app/modules/detailRoute/controllers/detail_route_controller.dart index e40c047d..3bc12109 100644 --- a/lib/app/modules/detailRoute/controllers/detail_route_controller.dart +++ b/lib/app/modules/detailRoute/controllers/detail_route_controller.dart @@ -34,6 +34,10 @@ class DetailRouteController extends GetxController { void setAttribute(String name, dynamic newValue) { modify.set(name, newValue); onEdit.value = true; + if(name == 'start'){ + debugPrint('Start Value Changed to $newValue'); + startValue.value = newValue; + } initValues(); } @@ -82,7 +86,7 @@ class DetailRouteController extends GetxController { statusValue.value = modify.draft.status; entryValue.value = modify.draft.entry; modifiedValue.value = modify.draft.modified; - startValue.value = modify.draft.start; + startValue.value ??= null; endValue.value = modify.draft.end; dueValue.value = modify.draft.due; waitValue.value = modify.draft.wait; From c84e7ddc523cbed0c96633bb90db3f54c11ab831 Mon Sep 17 00:00:00 2001 From: Arjav Patel Date: Sat, 11 Jan 2025 16:22:27 +0530 Subject: [PATCH 5/5] Fixed the issue of the default assignment of the attributes --- .../detailRoute/controllers/detail_route_controller.dart | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/app/modules/detailRoute/controllers/detail_route_controller.dart b/lib/app/modules/detailRoute/controllers/detail_route_controller.dart index e40c047d..3bc12109 100644 --- a/lib/app/modules/detailRoute/controllers/detail_route_controller.dart +++ b/lib/app/modules/detailRoute/controllers/detail_route_controller.dart @@ -34,6 +34,10 @@ class DetailRouteController extends GetxController { void setAttribute(String name, dynamic newValue) { modify.set(name, newValue); onEdit.value = true; + if(name == 'start'){ + debugPrint('Start Value Changed to $newValue'); + startValue.value = newValue; + } initValues(); } @@ -82,7 +86,7 @@ class DetailRouteController extends GetxController { statusValue.value = modify.draft.status; entryValue.value = modify.draft.entry; modifiedValue.value = modify.draft.modified; - startValue.value = modify.draft.start; + startValue.value ??= null; endValue.value = modify.draft.end; dueValue.value = modify.draft.due; waitValue.value = modify.draft.wait;