visualDensity property
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:
- ThemeData.visualDensity, which specifies the visualDensity for all widgets within a Theme.
- InputDecoration.visualDensity, which can override this setting for a given decorator.
Implementation
final VisualDensity? visualDensity;