Created
December 1, 2025 18:45
-
-
Save Taosif7/d7aba6e993e7f44c33524a654ddfb675 to your computer and use it in GitHub Desktop.
Conceptual implementation of Travel filter controller
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class TravelFilterController { | |
| MasterFilters? masterFilters; | |
| MasterFilters? userSelectedFilters; | |
| MasterFilters? lastAppliedFilters; | |
| bool get hasAnyFilterApplied => | |
| userSelectedFilters?.selectionFilters?.isFilterApplied ?? false; | |
| void onFilterOptionTapped(String filterId, String optionId) { | |
| // delegate to selection/slider/toggle controller managing their state | |
| // update the userSelectedFilters | |
| } | |
| void applyFilters() { | |
| lastAppliedFilters = userSelectedFilters?.duplicate(); | |
| // call criteria callback to trigger search | |
| } | |
| void clearAll() { | |
| // reset user selections to match masterFilters | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment