How to return from a forEach loop in Dart? : <p>I have this function</p>

<pre><code>  bool nameExists(players, player) {
    players.forEach((f) {
      if (f.data['name'].toLowerCase() == player.toLowerCase()) {
        return true;
      }
    });

    return false;
  }
</code></pre>

<p>It always return false, even if the condition is satisfied.</p>

<p>Any ideas?</p>
