fit method

Widget fit({
  1. BoxFit? fit,
  2. AlignmentGeometry? alignment,
})

add FittedBox to parent widget

Implementation

Widget fit({BoxFit? fit, AlignmentGeometry? alignment}) {
  return FittedBox(
    child: this,
    fit: fit ?? BoxFit.contain,
    alignment: alignment ?? Alignment.center,
  );
}