0

I am making a Tinder kind of app. It is the same principal with swiping cards. I am using a swipeable stack, that contains the backend query. I want to filter the data so the user never sees the same card, because they like/dislike it.

The data in FireBase on the cards come from a different collection named Pets (not the users collection.) In the Pets-collection i have a list of strings (notViewAgain) that contains the users id who swiped it, so if you swipe a card, your userID is placed inside the list of the a collection in Pets. If I select the filter in FlutterFlow with the notViewAgain list. I can choose array contains or array contains any, but I need the opposite: array not contains. unfortunately i can't choose that option.

This is what the Pets structure looks like: Pets -> unique id -> name, age, category, notViewAgain (list users id of who swiped the card.)

The API call works and i can retrieve the data, but i can't filter the results on the notViewAgain. If I filter it on the list, it shows the cards where the userid is in, instead of the opposite. It needs to show the cards where the user id is not in.

How can i make the filters, that the cards are shown to the people whom's id's are not in the notViewAgain list? Or a work around?FilterFilter

Thank you in advance

I tried several ways, but none worked.

0 Answers0