insert method

  1. @override
void insert (RenderBox child, { RenderBox after })

Insert child into this render object's child list after the given child.

If after is null, then this inserts the child at the start of the list, and the child becomes the new firstChild.


void insert(RenderBox child, { RenderBox after }) {
  super.insert(child, after: after);
  assert(firstChild != null);
  assert(() {
    int index = indexOf(firstChild);
    RenderBox child = childAfter(firstChild);
    while (child != null) {
      assert(indexOf(child) > index);
      index = indexOf(child);
      child = childAfter(child);
    return true;