How to show list in flutter whose id matches


I have two list of data stored in

  1. final profiles =<ProfilesBloc>().state.profiles;
  2. final users=<UsersBloc>().state.users;

I want to build the list with the only whose matches the
I tried by if ( == but it’s not working
any help?


var newUser = users.where((user) =>;

you can basically use this method to check a condition to create a new list. Feel free to alter the codes as per your requirements.

Answered By – Kaushik Chandru

Answer Checked By – Katrina (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *