title: The return type 'bool' isn't a 'void', as required by the closure's context dart flutter
body: <p>I am getting the below error when using the <code>forEach</code> loop for the items when used in the function when returning the values.</p>
  <pre><code>bool validatedValues(List&lt;String&gt; values){
      values.forEach((i){
        if (i.length &gt; 3){
          return true;
        }
      });
      return false;
    }
  </code></pre>
  <p>Im using dart null safety sdk version: &quot;&gt;=2.12.0 &lt;3.0.0&quot;</p>
  <p>Complete error:</p>
  <pre><code>The return type 'bool' isn't a 'void', as required by the closure's context.dartreturn_of_invalid_type_from_closure
  </code></pre>