width property
The target width of the bitmap in logical pixels.
- If
width
is provided andheight
is null, the image will be scaled to the associated width, and the height will take whatever value is needed to maintain the image's original aspect ratio. This is similar to BoxFit.fitWidth. - If both
width
andheight
are non-null, the image will have the specified dimensions, which might distort the original aspect ratio, similar to BoxFit.fill. - If neither
width
norheight
is provided, the image will be rendered using theimagePixelRatio
value.
Implementation
final double? width;