setSize method
Sets the size of this node.
Override this method in subclasses that need custom size handling.
Implementation
@override
void setSize(Size newSize) {
final constrainedSize = Size(
newSize.width.clamp(minWidth, maxWidth),
newSize.height.clamp(minHeight, maxHeight),
);
super.setSize(constrainedSize);
}