rated.</p>
<p>Example:</p>
<pre class="language-dart"><code>var pairs = [[1, 2], [3, 4]];
var flattened = pairs.expand((pair) =&gt; pair).toList();
print(flattened); // =&gt; [1, 2, 3, 4];

var input = [1, 2, 3];
var duplicated = input.expand((i) =&gt; [i, i]).toList();
print(duplicated); // =&gt; [1, 1, 2, 2, 3, 3]
</code></pre>
    </section>
    
    <section class="summary source-code" id="source">
      <h2><span>Implementation</span> </h2>
      <pre class="language-dart"><code class="language-dart">I