Suppose I have these maps:
Map<int,List<String>> firstMap = {1:["a", "b"]};
Map<int,List<String>> secondMap = {2:["c"]};
Map<int,List<String>> thirdMap = {1:["d"]};
I want to merge them without overwriting values with same key to have this output:
{1: [a, b, d], 2: [c]
I used both spread operator and adAll method and both overwrite the value for key 1 to have {1: [d], 2: [c]}
instead of .{1: [a, b, d], 2: [c]