From 539135bbcc3f6448dc729b3f41d869b843d47a00 Mon Sep 17 00:00:00 2001 From: Arjav Patel Date: Thu, 9 Jan 2025 20:55:01 +0530 Subject: [PATCH 1/3] 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/3] 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/3] 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;