performLayout method

  1. @override
void performLayout(
  1. Constraints constraints
)
override

Implementation

@override
void performLayout(Constraints constraints) {
  final boxConstraints = constraints.asBoxConstraints;
  final childWidget = builder(buildContext, boxConstraints);

  _childElement?.unmount();
  _childElement = childWidget.createElement()..mount(null);

  final childRender = _childElement?.renderObject;
  if (childRender != null) {
    childRender.layout(constraints, parentUsesSize: true);
    size = childRender.size ?? Size.zero;
    child = childRender as RenderBox;
  } else {
    size = Size.zero;
    child = null;
  }
}