How to filter images based on radio inputs across pages?

Hi All,

I'm trying to filter a set of images (stored in firebase) based on radio button inputs located across multiple pages.

Scenario: User selects radio option A on page 1, which filters and updates the image shown. Then user navigates to page 2 and selects radio option B, which should filter and update the image based on both option A (page 1) and option B (page 2).

My initial thinking was to store the collective state of the radio buttons as an App state, then filter by that in my backend query upon page load, but can't get it to work. I also can't seem to get conditional logic (AND/OR) in the query filter I think because the images are a list/stored as an array.

Db schema: Image_ID = String, Image = Image path, Image_attributes = List<string>

Each attribute is displayed as a radio button option, and the buttons are grouped based on commonalities, hence they are located on separate pages.

Lastly, each combination of radio button options will represent a unique image, so I included an Image_ID.

Any help on this would be really appreciated.


Thanks,

Matt

3