insertNodes method
Implementation
void insertNodes(
Path path,
Iterable<Node> nodes, {
bool deepCopy = true,
}) {
if (nodes.isEmpty) {
return;
}
if (deepCopy) {
// add `toList()` to prevent the redundant copy of the nodes when looping
nodes = nodes.map((e) => e.copyWith()).toList();
}
add(
InsertOperation(
path,
nodes,
),
);
}