Skip to content

Commit 8a82daf

Browse files
author
Inderjeet Singh
committed
added some more intervals
1 parent ea6e9cc commit 8a82daf

4 files changed

Lines changed: 76 additions & 34 deletions

File tree

lib/app/modules/detailRoute/views/detail_route_view.dart

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,13 @@ class AttributeWidget extends StatelessWidget {
375375
final options = [
376376
'None',
377377
'daily',
378+
'weekdays',
378379
'weekly',
380+
'biweekly',
379381
'monthly',
382+
'bimonthly',
383+
'quarterly',
384+
'semiannual',
380385
'yearly',
381386
];
382387
final selected = await showDialog<String>(
@@ -388,21 +393,23 @@ class AttributeWidget extends StatelessWidget {
388393
style: TextStyle(color: tColors.primaryTextColor),
389394
),
390395
backgroundColor: tColors.dialogBackgroundColor,
391-
content: Column(
392-
mainAxisSize: MainAxisSize.min,
393-
children: options
394-
.map(
395-
(option) => ListTile(
396-
title: Text(
397-
option,
398-
style: TextStyle(
399-
color: tColors.primaryTextColor),
396+
content: SingleChildScrollView(
397+
child: Column(
398+
mainAxisSize: MainAxisSize.min,
399+
children: options
400+
.map(
401+
(option) => ListTile(
402+
title: Text(
403+
option,
404+
style: TextStyle(
405+
color: tColors.primaryTextColor),
406+
),
407+
onTap: () => Navigator.of(dialogContext)
408+
.pop(option),
400409
),
401-
onTap: () =>
402-
Navigator.of(dialogContext).pop(option),
403-
),
404-
)
405-
.toList(),
410+
)
411+
.toList(),
412+
),
406413
),
407414
);
408415
},

lib/app/modules/home/views/add_task_bottom_sheet_new.dart

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -249,10 +249,9 @@ class AddTaskBottomSheet extends StatelessWidget {
249249
key: ValueKey('date-picker-${homeController.recur.value}'),
250250
initialDates: List<DateTime?>.from(homeController.selectedDates),
251251
onDateChanges: (List<DateTime?> p0) {
252-
final previousDue =
253-
homeController.selectedDates.isNotEmpty
254-
? homeController.selectedDates[0]
255-
: null;
252+
final previousDue = homeController.selectedDates.isNotEmpty
253+
? homeController.selectedDates[0]
254+
: null;
256255
homeController.selectedDates.value = p0;
257256
final nextDue = p0.isNotEmpty ? p0[0] : null;
258257
if (previousDue != nextDue) {
@@ -345,8 +344,30 @@ class AddTaskBottomSheet extends StatelessWidget {
345344
);
346345

347346
Widget buildRecurrenceSelector(BuildContext context) {
348-
final options = ['', 'daily', 'weekly', 'monthly', 'yearly'];
349-
final labels = ['None', 'Daily', 'Weekly', 'Monthly', 'Yearly'];
347+
final options = [
348+
'',
349+
'daily',
350+
'weekdays',
351+
'weekly',
352+
'biweekly',
353+
'monthly',
354+
'bimonthly',
355+
'quarterly',
356+
'semiannual',
357+
'yearly',
358+
];
359+
final labels = [
360+
'None',
361+
'Daily',
362+
'Weekdays',
363+
'Weekly',
364+
'Biweekly',
365+
'Monthly',
366+
'Bimonthly',
367+
'Quarterly',
368+
'Semiannual',
369+
'Yearly',
370+
];
350371
return Column(
351372
crossAxisAlignment: CrossAxisAlignment.start,
352373
children: [
@@ -360,6 +381,7 @@ class AddTaskBottomSheet extends StatelessWidget {
360381
const SizedBox(height: 8),
361382
Obx(() => Wrap(
362383
spacing: 8,
384+
runSpacing: 4,
363385
children: List.generate(options.length, (index) {
364386
final isSelected = homeController.recur.value == options[index];
365387
return ChoiceChip(

lib/app/modules/taskc_details/controllers/taskc_details_controller.dart

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -432,19 +432,21 @@ class TaskcDetailsController extends GetxController {
432432
'${SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.select} $label',
433433
style: TextStyle(color: tColors.primaryTextColor),
434434
),
435-
content: Column(
436-
mainAxisSize: MainAxisSize.min,
437-
children: options.map((option) {
438-
return RadioListTile<String>(
439-
title: Text(
440-
option,
441-
style: TextStyle(color: tColors.primaryTextColor),
442-
),
443-
value: option,
444-
groupValue: initialValue,
445-
onChanged: (value) => Get.back(result: value),
446-
);
447-
}).toList(),
435+
content: SingleChildScrollView(
436+
child: Column(
437+
mainAxisSize: MainAxisSize.min,
438+
children: options.map((option) {
439+
return RadioListTile<String>(
440+
title: Text(
441+
option,
442+
style: TextStyle(color: tColors.primaryTextColor),
443+
),
444+
value: option,
445+
groupValue: initialValue,
446+
onChanged: (value) => Get.back(result: value),
447+
);
448+
}).toList(),
449+
),
448450
),
449451
),
450452
);

lib/app/modules/taskc_details/views/taskc_details_view.dart

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,18 @@ class TaskcDetailsView extends GetView<TaskcDetailsController> {
117117
controller.recur.value.isEmpty
118118
? 'None'
119119
: controller.recur.value,
120-
['None', 'daily', 'weekly', 'monthly', 'yearly'],
120+
[
121+
'None',
122+
'daily',
123+
'weekdays',
124+
'weekly',
125+
'biweekly',
126+
'monthly',
127+
'bimonthly',
128+
'quarterly',
129+
'semiannual',
130+
'yearly',
131+
],
121132
(value) {
122133
controller.updateField(
123134
controller.recur,

0 commit comments

Comments
 (0)