addAndLayoutChild method

RenderBox? addAndLayoutChild(
  1. BoxConstraints childConstraints, {
  2. required int index,
  3. RenderBox? after,
  4. bool parentUsesSize = false,
})
inherited

Implementation

RenderBox? addAndLayoutChild(
    BoxConstraints childConstraints, {
      required int index,
      RenderBox? after,
      bool parentUsesSize = false,
    }) {
  assert(_debugAssertChildListLocked());
  final child = _createOrObtainOneChild(index, after: after);
  if (child != null) {
    child.layout(childConstraints, parentUsesSize: parentUsesSize);
    return child;
  }
  childManager.setDidUnderflow(true);
  return null;
}