child property

RenderBox? get child

The single render child, or null when there is none.

Implementation

RenderBox? get child => _child;
set child (RenderBox? value)

Replaces the child, dropping the old one and adopting the new one.

Idempotent: passing the current child or one already adopted as this object's child is a no-op.

Implementation

set child(RenderBox? value) {
  if (identical(_child, value)) {
    return;
  }
  if (_child != null && _child!.parent == this) {
    dropChild(_child!);
  }
  _child = value;
  if (value != null && value.parent != this) {
    adoptChild(value);
  }
}