void replaceRange(String path, int start, int end, Iterable replacement)

Removes the objects in the range start inclusive to end exclusive and inserts the contents of replacement in its place for the list at path.

Source

void replaceRange(String path, int start, int end, Iterable replacement) {
  jsElement.callMethod(
      'splice',
      [path, start, end - start]
        ..addAll(replacement.map((element) => convertToJs(element))));
}