@@ -367,34 +367,52 @@ class AddTaskBottomSheet extends StatelessWidget {
367
367
),
368
368
textAlign: TextAlign .left,
369
369
),
370
+ const SizedBox (width: 2 ,),
370
371
Obx (
371
- () => DropdownButton <String >(
372
- dropdownColor: AppSettings .isDarkMode
373
- ? TaskWarriorColors .kdialogBackGroundColor
374
- : TaskWarriorColors .kLightDialogBackGroundColor,
375
- value: homeController.priority.value,
376
- elevation: 16 ,
377
- style: GoogleFonts .poppins (
378
- color: AppSettings .isDarkMode
379
- ? TaskWarriorColors .white
380
- : TaskWarriorColors .black,
381
- ),
382
- underline: Container (
383
- height: 1.5 ,
384
- color: AppSettings .isDarkMode
385
- ? TaskWarriorColors .kdialogBackGroundColor
386
- : TaskWarriorColors .kLightDialogBackGroundColor,
387
- ),
388
- onChanged: (String ? newValue) {
389
- homeController.priority.value = newValue! ;
390
- },
391
- items: < String > ['H' , 'M' , 'L' , 'None' ]
392
- .map <DropdownMenuItem <String >>((String value) {
393
- return DropdownMenuItem <String >(
394
- value: value,
395
- child: Text (' $value ' ),
396
- );
397
- }).toList (),
372
+ () => Row (
373
+ children: [
374
+ for (int i= 0 ;i< homeController.priorityList.length;i++ )
375
+ Padding (
376
+ padding: const EdgeInsets .symmetric (horizontal: 2.5 ),
377
+ child: GestureDetector (
378
+ onTap: () {
379
+ homeController.priority.value = homeController.priorityList[i];
380
+ debugPrint (homeController.priority.value);
381
+ },
382
+ child: AnimatedContainer (
383
+ duration: const Duration (milliseconds: 100 ),
384
+ height: 30 ,
385
+ width: 37 ,
386
+ decoration: BoxDecoration (
387
+
388
+ borderRadius: BorderRadius .circular (8 ),
389
+ border: Border .all (
390
+ color: homeController.priority.value == homeController.priorityList[i]
391
+ ? AppSettings .isDarkMode
392
+ ? TaskWarriorColors .kLightPrimaryBackgroundColor
393
+ : TaskWarriorColors .kprimaryBackgroundColor
394
+ : AppSettings .isDarkMode
395
+ ? TaskWarriorColors .kprimaryBackgroundColor
396
+ : TaskWarriorColors .kLightPrimaryBackgroundColor,
397
+ )
398
+ ),
399
+ child: Center (
400
+ child: Text (
401
+ homeController.priorityList[i],
402
+ textAlign: TextAlign .center,
403
+ style: GoogleFonts .poppins (
404
+ fontWeight: FontWeight .bold,
405
+ fontSize: 17 ,
406
+ color: homeController.priorityColors[i]
407
+ ),
408
+ ),
409
+ ),
410
+ ),
411
+
412
+ ),
413
+ )
414
+
415
+ ],
398
416
),
399
417
)
400
418
],
0 commit comments