fitted method

Widget fitted({
  1. BoxFit fit = BoxFit.contain,
  2. AlignmentGeometry alignment = Alignment.center,
  3. Clip clipBehavior = Clip.none,
  4. Key? key,
})

Scales and positions its child within itself according to fit.

Implementation

Widget fitted({
  BoxFit fit = BoxFit.contain,
  AlignmentGeometry alignment = Alignment.center,
  Clip clipBehavior = Clip.none,
  Key? key,
}) {
  return FittedBox(
    key: key,
    fit: fit,
    alignment: alignment,
    clipBehavior: clipBehavior,
    child: this,
  );
}