child property

RenderObject? get child

The one child of this object; null for none.

Setting it drops the child there was and adopts the new one, which lays this object out again.

Implementation

RenderObject? get child => _child;
set child (RenderObject? c)

Drops the child there was and adopts c.

Implementation

set child(RenderObject? c) {
  final old = _child;
  if (identical(c, old)) {
    return;
  }
  _child = c;
  if (old != null) {
    drop(old);
  }
  if (c != null) {
    adopt(c);
  }
}