So lets say I have a list of objects like this:
List<Map<String, dynamic>> list = [{'a': 'red', 'b': 'blue'}, {'a': 'yellow', 'b': 'orange'}, {'a': 'green', 'b': 'purple'}];
Assuming each a and b value is unique, how would I find the object where a === yellow and replace that object with a new object like {'a': 'brown', 'b': 'white'} at the same index location in the list of the original object?
EDIT I forgot to mention, I need to remove the object first to manipulate the data and then add it back at same location.