title: Flutter iterate through List with access to index
body: <p>I tried some other solutions to this like using <code>asMap()</code> and <code>forEach</code> but kept getting different errors. Like it was saying the return type of my <code>ChartBar</code> isn't a 'MapEntry', as defined by anonymous closure, or <code>The expression here has a type of 'void', and therefore cannot be used.</code></p>
  
  <pre><code>Row(
      mainAxisSize: MainAxisSize.min,
      mainAxisAlignment: MainAxisAlignment.spaceAround,
      crossAxisAlignment: CrossAxisAlignment.end,
      children: myList.map((data) {
        return ChartBar(
            ///etc
      }).toList(),
    )
  </code></pre>
  
  <p>I want the <code>index</code> as well.</p>