Get iteration index from List.map()
To get access to index, you need to convert your list to a map using the asMap operator. Example final fruitList = [‘apple’, ‘orange’, ‘mango’]; final fruitMap = fruitList.asMap(); // {0: ‘apple’, 1: ‘orange’, 2: ‘mango’} // To access ‘orange’ use the index 1. final myFruit = fruitMap[1] // ‘orange’ // To convert back to … Read more