ection class="summary source-code" id="source">
      <h2><span>Implementation</span></h2>
      <pre class="language-dart"><code class="language-dart">void replaceRange(int start, int end, Iterable&lt;E&gt; newContents) {
  RangeError.checkValidRange(start, end, this.length);
  if (newContents is! EfficientLengthIterable) {
    newContents = newContents.toList();
  }
  int removeLength = end - start;
  int insertLength = newContents.length;
  if (removeLength &gt;= insertLength) {
    int insertEnd = start