s="language-dart"><code>List&lt;String&gt; numbers = ['one', 'two', 'three', 'four'];
numbers.retainWhere((item) =&gt; item.length == 3);
numbers.join(', '); // 'one, two'
</code></pre>
<p>Throws an <a href="../../dart-core/UnsupportedError-class.html">UnsupportedError</a> if this is a fixed-length list.</p>
    </section>
    
    <section class="summary source-code" id="source">
      <h2><span>Implementation</span></h2>
      <pre class="language-dart"><code class="language-dart">void retainWhere(bool te