fit property

OverflowBoxFit fit

The way to size the render object.

This only affects scenario when the child does not indeed overflow. If set to OverflowBoxFit.deferToChild, the render object will size itself to match the size of its child within the constraints of its parent, or as small as the parent allows if no child is set. If set to OverflowBoxFit.max (the default), the render object will size itself to be as large as the parent allows.

Implementation

OverflowBoxFit get fit => _fit;
void fit=(OverflowBoxFit value)

Implementation

set fit(OverflowBoxFit value) {
  if (_fit == value) {
    return;
  }
  _fit = value;
  markNeedsLayoutForSizedByParentChange();
}