getTextTheme method Null safety

ButtonTextTheme getTextTheme(
  1. MaterialButton button

Defines the button's base colors, and the defaults for the button's minimum size, internal padding, and shape.

Despite the name, this property is not the TextTheme whose TextTheme.button is used as the button text's TextStyle.


ButtonTextTheme getTextTheme(MaterialButton button) => button.textTheme ?? textTheme;