FittedBox constructor

const FittedBox(
  1. {Key key,
  2. BoxFit fit: BoxFit.contain,
  3. AlignmentGeometry alignment:,
  4. Widget child}

Creates a widget that scales and positions its child within itself according to fit.

The fit and alignment arguments must not be null.


const FittedBox({
  Key key, = BoxFit.contain,
  this.alignment =,
  Widget child,
}) : assert(fit != null),
     assert(alignment != null),
     super(key: key, child: child);