I sit 6 Hours trying to add
Map<dynamic, dynamic> Contains Map<dynamic, dynamic> inside Another Map<dynamic, dynamic>
How to add Map like this:
{
map1:{
map1_key1: map1_val1
map1_key2: map1_val2
map1_2:{
map1_3:{
map3_key1: map3_val1
map3_key1: map3_val2
}
map2_key1: map2_val1
map2_key1: map2_val2
}
map1_key3: map1_val3
}
}
repeatedly inside map called masterMap , and access every key/value inside it like any other map ?
- i tried this
- i tried this
- i tried this
i tried this
- tried addAll() function gives me error called on null..
tried addEntries() function gives me
The argument type 'Map<dynamic, dynamic>' can't be assigned to the parameter type 'Iterable<MapEntry<dynamic, dynamic>>'
nothing work , i need help this is very bad and stupid thing , why there is no simple function to merge all map key/value with another one , that simple ?!
Update: my code:
Map<dynamic, dynamic> theSnapShot;
theSnapShot = {
'map1': {
'-LyUAD8B0LpKZ-5-cRn-': {
'CoordsMap': [null, {'FirstCoords': '30.088,31.279',}]
}
}
};
Map<dynamic, dynamic> masterMap;
masterMap.addAll(Map.from(theSnapShot['map1']));
output:
Unhandled Exception: NoSuchMethodError: The method 'addAll()' was called on null.
theSnapShotto that map right?