List<User> users= [User(id:'1'), User(id:'2'), User(id:'3'), User(id:'4')]; var user4 = users.where((element) => user.id == '4').first;