FittedBox
Overview
Scales the child widget down or up to fit a given area. For example, fit images of many different sizes into a card area.
Properties
| Property | Description | Value | Default |
|---|---|---|---|
fit | Sets how the child widget is scaled up or down to fit the box area. | fill, contain, cover, fitWidth, fitHeight, none, scaleDown | contain |
alignment | Sets where the fitted child is aligned inside the box. | Alignment value (X, Y) | Center |
clipBehavior | Sets how the part that extends beyond the box area is clipped. | none, hardEdge, antiAlias, antiAliasWithSaveLayer | none |