Fix style warnings

This commit is contained in:
exelix11 2025-10-15 09:15:19 +00:00 committed by Brandon Wees
parent f08c4ae258
commit 0d28dfd7b0

View file

@ -183,27 +183,16 @@ class QuickDatePicker extends HookWidget {
child: SingleChildScrollView( child: SingleChildScrollView(
child: RadioGroup( child: RadioGroup(
onChanged: (value) { onChanged: (value) {
switch (value) { if (value == null) return;
case _QuickPickerType.custom: final _ = switch (value) {
onRequestPicker(); _QuickPickerType.custom => onRequestPicker(),
break; _QuickPickerType.last1Month => onSelect(RecentMonthRangeFilter(1)),
case _QuickPickerType.last1Month: _QuickPickerType.last3Months => onSelect(RecentMonthRangeFilter(3)),
onSelect(RecentMonthRangeFilter(1)); _QuickPickerType.last9Months => onSelect(RecentMonthRangeFilter(9)),
break; // When a year is selected the combobox triggers onSelect() on its own.
case _QuickPickerType.last3Months: // Here we handle the radio button being selected which can only ever be the initial year
onSelect(RecentMonthRangeFilter(3)); _QuickPickerType.year => onSelect(YearFilter(_initialYear)),
break; };
case _QuickPickerType.last9Months:
onSelect(RecentMonthRangeFilter(9));
break;
case _QuickPickerType.year:
// The combobox triggers the onSelect event on its own so if this is ever selected it can only be on
// the default value set by the constructor
onSelect(YearFilter(_initialYear));
break;
default:
break;
}
}, },
groupValue: _selection, groupValue: _selection,
child: Column( child: Column(