foregroundColor property Null safety

MaterialStateProperty<Color?>? foregroundColor

The color for the button's Text and Icon widget descendants.

This color is typically used instead of the color of the textStyle. All of the components that compute defaults from ButtonStyle values compute a default foregroundColor and use that instead of the textStyle's color.


final MaterialStateProperty<Color?>? foregroundColor;