I have an array <EmailUser>[]
class EmailUser{
final String id;
final String type;
}
I want to iterate over the array and when the condition of (emailUser.id == id) is met I want to give this object a value for the type property.
I've seen firstWhereOrNull from the collections package. But that returns the object.
Which would involve removing the object and adding it to the array again..
What his the neatest way to do this..