getDisabledElevation method Null safety
- MaterialButton button
The button
's elevation when MaterialButton.onPressed is null (when
MaterialButton.enabled is false).
Returns the button's MaterialButton.elevation if it is non-null.
Otherwise the disabled elevation is 0.0.
Implementation
double getDisabledElevation(MaterialButton button) => button.disabledElevation ?? 0.0;