mirror of
https://github.com/immich-app/immich.git
synced 2025-12-12 15:50:43 -08:00
feat(mobile): Quick date picker in the search page (#22653)
* Quick date picker * Include current year in quick date picker * Quick date picker: localization, fix datetime overflows * Properly localized 'last_months' * Move quick_date_picker.dart to lib/presentation/widgets/search * Wrap the quick date picker state into its own class, improve the interaction patterns * Fix last9Months value * Improve method naming * Subtitle for "custom range" in quick date picker * Fix style warnings * Fix lint warning * fix: mobile unawaited_futures lint (#21661) * chore: add unawaited_futures lint as warning * remove unused dcm lints They will be added back later on a case by case basis * fix warning * auto gen file * review changes * conflict resolution --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com> * Quick date picker * Wrap the quick date picker state into its own class, improve the interaction patterns * chore: delete file from rebase --------- Co-authored-by: shenlong <139912620+shenlong-tanwen@users.noreply.github.com> Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com> Co-authored-by: bwees <brandonwees@gmail.com>
This commit is contained in:
@@ -6,7 +6,7 @@ class FilterBottomSheetScaffold extends StatelessWidget {
|
||||
const FilterBottomSheetScaffold({
|
||||
super.key,
|
||||
required this.child,
|
||||
required this.onSearch,
|
||||
this.onSearch,
|
||||
required this.onClear,
|
||||
required this.title,
|
||||
this.expanded,
|
||||
@@ -15,7 +15,7 @@ class FilterBottomSheetScaffold extends StatelessWidget {
|
||||
final bool? expanded;
|
||||
final String title;
|
||||
final Widget child;
|
||||
final Function() onSearch;
|
||||
final Function()? onSearch;
|
||||
final Function() onClear;
|
||||
|
||||
@override
|
||||
@@ -48,15 +48,16 @@ class FilterBottomSheetScaffold extends StatelessWidget {
|
||||
},
|
||||
child: const Text('clear').tr(),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
ElevatedButton(
|
||||
key: const Key('search_filter_apply'),
|
||||
onPressed: () {
|
||||
onSearch();
|
||||
context.pop();
|
||||
},
|
||||
child: const Text('search_filter_apply').tr(),
|
||||
),
|
||||
if (onSearch != null) const SizedBox(width: 8),
|
||||
if (onSearch != null)
|
||||
ElevatedButton(
|
||||
key: const Key('search_filter_apply'),
|
||||
onPressed: () {
|
||||
onSearch!();
|
||||
context.pop();
|
||||
},
|
||||
child: const Text('search_filter_apply').tr(),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user