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, then the ambient InputDecorationThemeData.visualDensity will be used. If that is null then ThemeData.visualDensity will be used.

See also:

Implementation

final VisualDensity? visualDensity;