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, then the ambient InputDecorationThemeData.visualDensity will be used. If that is null then ThemeData.visualDensity will be used.
See also:
- ThemeData.visualDensity, which specifies the visualDensity for all widgets within a Theme.
- InputDecorationThemeData.visualDensity, which can override this setting for a given decorator.
Implementation
final VisualDensity? visualDensity;