getDisabledTextColor method
The foreground color of the button
's text and icon when
MaterialButton.onPressed is null (when MaterialButton.enabled is false).
Returns the button's MaterialButton.disabledColor if it is non-null. Otherwise the color scheme's ColorScheme.onSurface color is returned with its opacity set to 0.30 if getBrightness is dark, 0.38 otherwise.
Implementation
Color getDisabledTextColor(MaterialButton button) {
if (button.disabledTextColor != null)
return button.disabledTextColor;
return _getDisabledColor(button);
}