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

Code Example 1

var map1 = Map.fromIterable(list, key: (e) => e.name, value: (e) => e.age);

Learn ReactJs, React Native from akashmittal.com