I'm developing an online shopping app, I want to check if the product in the user's wishlist/favorite list or not.
To read all products from firestore I used a stream getter method in a DatabaseService class that reads all products and then maps to the Product Model. In the Home screen I used StreamProvider<List>.value(....) and then in the display section (where I want to display products) I said:
final products = Provider.of<List<Product>>(context);
and then I used a grid view builder to display all products. it worked well. But I want to check if this product in the user's favorite list / wishlist, how can I know??
I tried many ways but it does not worked