Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

loop map flutter

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) {
     ....
   }
}
Source by www.codevscolor.com #
 
PREVIOUS NEXT
Tagged: #loop #map #flutter
ADD COMMENT
Topic
Name
8+9 =