preferredSize property
The size that this RenderCustomPaint should aim for, given the layout constraints, if there is no child.
Defaults to Size.zero.
If there's a child, this is ignored, and the size of the child is used instead.
Implementation
Size get preferredSize => _preferredSize;
Implementation
set preferredSize(Size value) {
assert(value != null);
if (preferredSize == value)
return;
_preferredSize = value;
markNeedsLayout();
}