fit property Null safety

BoxFit fit

How to inscribe the child into the space allocated during layout.

Implementation

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

Implementation

set fit(BoxFit value) {
  assert(value != null);
  if (_fit == value) {
    return;
  }
  final BoxFit lastFit = _fit;
  _fit = value;
  if (_fitAffectsLayout(lastFit) || _fitAffectsLayout(value)) {
    markNeedsLayout();
  } else {
    _clearPaintData();
    markNeedsPaint();
  }
}