style property Null safety

ButtonStyle? style

Customizes this button's appearance.

Non-null properties of this style override the corresponding properties in _IconButtonM3.themeStyleOf and _IconButtonM3.defaultStyleOf. MaterialStatePropertys that resolve to non-null values will similarly override the corresponding MaterialStatePropertys in _IconButtonM3.themeStyleOf and _IconButtonM3.defaultStyleOf.

The style is only used for Material 3 IconButton. If ThemeData.useMaterial3 is set to true, style is preferred for icon button customization, and any parameters defined in style will override the same parameters in IconButton.

For example, if IconButton's visualDensity is set to VisualDensity.standard and style's visualDensity is set to VisualDensity.compact, the icon button will have VisualDensity.compact to define the button's layout.

Null by default.


final ButtonStyle? style;