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.

Implementation

ButtonTextTheme getTextTheme(MaterialButton button) {
  return button.textTheme ?? textTheme;
}