getTextTheme method Null safety
- 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) => button.textTheme ?? textTheme;