main() {
var numMap = Map();
numMap["one"] = 1;
numMap["two"] = 2;
numMap["three"] = 3;
numMap["four"] = 4;
numMap["five"] = 5;
numMap.forEach((k, v) => print("Key : $k, Value : $v"));
}
List<Map> list = [
{
"id": 1,
"name": "name1",
"type": "Both",
"count": 4
},
{
"id": 2,
"name": "name2",
"type": "Both",
"count": 6
},
{
"id": 3,
"name": "name1",
"type": "Both",
"count": 2
},
{
"id": 4,
"name": "name3",
"type": "Both",
"count": 8
}
];
for(Map m in list){
if (m['name'].toString() == null) {
....
}
}