I'm querying documents to a custom List with firestore. But I want to specify if that document has the current user ID inside, it shouldn't be put in the list.
To clarify: It's a stack of cards. Each card has the option to be skipped. If the user skips it, their id is put in that card's field named "skipped". Therefore, that current user shouldn't see that card again, because the card has a field that says their id has skipped it.
Something like:
List<CustomCard> cards =
snapshot.documents.where(/* current ID DOESN'T exists in doc["skipped"], so adds to map*/).map((doc) => CustomCard.fromDocument(doc)).toList();
Here's how I'm adding the users Id to the card skipped field:
//On skip button pressed, call:
handleSkip() {
cardRef.document(projectId).updateData({'skipped.$currentUid': true});
}
How can I dismiss the card on the stack from being displayed, if that current user id has skipped it?