Check out example codes for "get index of element in map dart". It will help you in understanding the concepts better.

Code Example 1

myList.asMap().entries.map((entry) {
    int idx = entry.key;
    String val = entry.value;

    return something;
}

Learn ReactJs, React Native from akashmittal.com