visualDensity property

VisualDensity? visualDensity
final

Defines how compact the decoration's layout will be.

The vertical aspect of the default or user-specified contentPadding is adjusted automatically based on visualDensity.

When the visual density is VisualDensity.compact, the vertical aspect of contentPadding is reduced by 8 pixels.

When the visual density is VisualDensity.comfortable, the vertical aspect of contentPadding is reduced by 4 pixels.

When the visual density is VisualDensity.standard vertical aspect of contentPadding is not changed.

If null, defaults to ThemeData.visualDensity.

See also:

Implementation

final VisualDensity? visualDensity;