preferredSize property

Size get preferredSize

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;
set preferredSize (Size value)

Implementation

set preferredSize(Size value) {
  if (preferredSize == value) {
    return;
  }
  _preferredSize = value;
  markNeedsLayout();
}