Scales and positions its child within itself.
The fit
and alignment
arguments must not be null.
Source
RenderFittedBox({ RenderBox child, ImageFit fit: ImageFit.contain, FractionalOffset alignment: FractionalOffset.center }) : _fit = fit, _alignment = alignment, super(child) { assert(fit != null); assert(alignment != null && alignment.dx != null && alignment.dy != null); }