Check out example codes for "Map in dart". It will help you in understanding the concepts better.

Code Example 1

// returns an iterator of a new array that 
// has been modified by the map function

final arr = [1, 2, 3];
final arr10 = arr.map((element) {
    return element * 10;
  }).toList(); 
  // we use toList() because .map returns
  // an iterator

// arr10 -> [10, 20, 30]

Code Example 2

void main() { 
   var details = new Map(); 
   details['Usrname'] = 'admin'; 
   details['Password'] = '[email protected]'; 
   print(details); 
} 

// Output
// {Usrname: admin, Password: [email protected]}

Learn ReactJs, React Native from akashmittal.com