performResize method
override
Updates the render objects size using only the constraints.
Do not call this function directly: call layout instead. This function is called by layout when there is actually work to be done by this render object during layout. The layout constraints provided by your parent are available via the constraints getter.
This function is called only if sizedByParent is true.
By default this method sets size to the result of computeDryLayout called with the current constraints. Instead of overriding this method, consider overriding computeDryLayout.
Implementation
@override
void performResize() {
final Size? oldSize = hasSize ? size : null;
super.performResize();
// Ignoring return value since we are doing a layout either way
// (performLayout will be invoked next).
horizontalOffset.applyViewportDimension(size.width);
verticalOffset.applyViewportDimension(size.height);
if (oldSize != size) {
// Specs can depend on viewport size.
_didResize = true;
}
}