Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed issue #410 #430

Merged
merged 4 commits into from
Jan 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion lib/app/modules/home/controllers/home_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,18 @@ class HomeController extends GetxController {
final projectcontroller = TextEditingController();
var due = Rxn<DateTime>();
RxString dueString = ''.obs;
RxString priority = 'M'.obs;
final priorityList = ['L','X','M','H'];
final priorityColors = [
TaskWarriorColors.green,
TaskWarriorColors.grey,
TaskWarriorColors.yellow,
TaskWarriorColors.red,



];
RxString priority = 'X'.obs;

final tagcontroller = TextEditingController();
RxList<String> tags = <String>[].obs;
RxBool inThePast = false.obs;
Expand Down
72 changes: 45 additions & 27 deletions lib/app/modules/home/views/add_task_bottom_sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -367,34 +367,52 @@ class AddTaskBottomSheet extends StatelessWidget {
),
textAlign: TextAlign.left,
),
const SizedBox(width: 2,),
Obx(
() => DropdownButton<String>(
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: <String>['H', 'M', 'L', 'None']
.map<DropdownMenuItem<String>>((String value) {
return DropdownMenuItem<String>(
value: value,
child: Text(' $value'),
);
}).toList(),
() => Row(
children: [
for(int i=0;i<homeController.priorityList.length;i++)
Padding(
padding: const EdgeInsets.symmetric(horizontal: 2.5),
child: GestureDetector(
onTap: () {
homeController.priority.value = homeController.priorityList[i];
debugPrint(homeController.priority.value);
},
child: AnimatedContainer(
duration: const Duration(milliseconds: 100),
height: 30,
width: 37,
decoration: BoxDecoration(

borderRadius: BorderRadius.circular(8),
border: Border.all(
color: homeController.priority.value == homeController.priorityList[i]
? AppSettings.isDarkMode
? TaskWarriorColors.kLightPrimaryBackgroundColor
: TaskWarriorColors.kprimaryBackgroundColor
: AppSettings.isDarkMode
? TaskWarriorColors.kprimaryBackgroundColor
: TaskWarriorColors.kLightPrimaryBackgroundColor,
)
),
child: Center(
child: Text(
homeController.priorityList[i],
textAlign: TextAlign.center,
style: GoogleFonts.poppins(
fontWeight: FontWeight.bold,
fontSize: 17,
color: homeController.priorityColors[i]
),
),
),
),

),
)

],
),
)
],
Expand Down
2 changes: 1 addition & 1 deletion pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ packages:
source: hosted
version: "7.2.11"
built_collection:
dependency: transitive
dependency: "direct main"
description:
name: built_collection
sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100"
Expand Down
Loading