getDisabledElevation method

double getDisabledElevation (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.

Otheriwse the disabled elevation is 0.0.

Implementation

double getDisabledElevation(MaterialButton button) {
  if (button.disabledElevation != null)
    return button.disabledElevation;
  return 0.0;
}