How to search a list of Object by another list of items in dart

后端 未结 5 1345
一向
一向 2021-02-14 08:00

How to search a list of a class object with one of its property matching to any value in another list of strings

I am able to get filtering based on a single string , bu

5条回答
  •  借酒劲吻你
    2021-02-14 08:22

    You can simply use List.where() to filter a list

    final List cartprd = snapshot.documents
          .where((f) => shop_cart.ShoppingCart.contains(f.data));
    

提交回复
热议问题