ViewRef insert(ViewRef viewRef, [ num index = -1 ])

Inserts a View identified by a ViewRef into the container.

If index is not specified, the new View will be inserted as the last View in the container.

Returns the inserted ViewRef. TODO(i): refactor insert+remove into move

Source

ViewRef insert(ViewRef viewRef, [num index = -1]) {
  if (index == -1) index = this.length;
  var viewRef_ = (viewRef as ViewRefImpl);
  this._element.attachView(viewRef_.appView, index);
  return viewRef;
}