Skip to main content

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

PropertyDescriptionValueDefault
fitSets how the child widget is scaled up or down to fit the box area.fill, contain, cover, fitWidth, fitHeight, none, scaleDowncontain
alignmentSets where the fitted child is aligned inside the box.Alignment value (X, Y)Center
clipBehaviorSets how the part that extends beyond the box area is clipped.none, hardEdge, antiAlias, antiAliasWithSaveLayernone