title: Best Way to Iterate & Extract key/value from a Map in Dart?
body: <p><strong>GIVEN</strong></p>
  <p><code>Map&lt;String, List&lt;String&gt;&gt;</code> where:</p>
  <ul>
  <li>the <em>key</em> is a team code</li>
  <li>the <em>value</em> is list of player names.</li>
  </ul>
  <p><strong>WHEN</strong></p>
  <p>When the user selects a name, I need to output the team code by comparing to the list of players (There could be duplicate names and other things that I still haven't fully considered).</p>
  <p>I did find something that works, but not sure if it works well when the amount of data increases.</p>
  <pre><code>//Team Map Example    
  var teamMap = {
    &quot;TeamFoo&quot;: [&quot;Bob&quot;, &quot;John&quot;, &quot;Jill&quot;],
    &quot;TeamBar&quot;: [&quot;Mike&quot;, &quot;Fred&quot;]
  };
  
  //Loop Example
  teamMap.forEach((key, value) {
     if (value.indexOf(_lastName) &gt;= 0) {
        teamName = key;
     }
  });
  </code></pre>
  <p>Is there a better way to write this functionality to improve speed or readability?</p>