fit method

  1. @widgetFactory
Widget fit(
  1. BoxFit fit, {
  2. AlignmentGeometry alignment = Alignment.center,
  3. Clip clipBehavior = Clip.none,
})

Scales and positions this widget within the available space according to fit

Implementation

@widgetFactory
Widget fit(
  BoxFit fit, {
  AlignmentGeometry alignment = Alignment.center,
  Clip clipBehavior = Clip.none,
}) {
  return FleetFittedBox(
    fit: fit,
    alignment: alignment,
    clipBehavior: clipBehavior,
    child: this,
  );
}