FittedBox constructor

const FittedBox({Key key, BoxFit fit: BoxFit.contain, AlignmentGeometry alignment: Alignment.center, 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.

Implementation

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