mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
Fix style warnings
This commit is contained in:
parent
f08c4ae258
commit
0d28dfd7b0
1 changed files with 10 additions and 21 deletions
|
|
@ -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(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue