Unverified Commit 73687a97 authored by Hans Muller's avatar Hans Muller Committed by GitHub

Correct MaterialButton disabledColor (#30531)

parent d15b3b1c
...@@ -491,7 +491,7 @@ class ButtonThemeData extends Diagnosticable { ...@@ -491,7 +491,7 @@ class ButtonThemeData extends Diagnosticable {
if (fillColor != null) if (fillColor != null)
return fillColor; return fillColor;
if (button is FlatButton || button is OutlineButton) if (button is FlatButton || button is OutlineButton || button.runtimeType == MaterialButton)
return null; return null;
if (button.enabled && button is RaisedButton && _buttonColor != null) if (button.enabled && button is RaisedButton && _buttonColor != null)
......
...@@ -263,7 +263,7 @@ class MaterialButton extends StatelessWidget { ...@@ -263,7 +263,7 @@ class MaterialButton extends StatelessWidget {
return RawMaterialButton( return RawMaterialButton(
onPressed: onPressed, onPressed: onPressed,
onHighlightChanged: onHighlightChanged, onHighlightChanged: onHighlightChanged,
fillColor: color, fillColor: buttonTheme.getFillColor(this),
textStyle: theme.textTheme.button.copyWith(color: buttonTheme.getTextColor(this)), textStyle: theme.textTheme.button.copyWith(color: buttonTheme.getTextColor(this)),
highlightColor: highlightColor ?? theme.highlightColor, highlightColor: highlightColor ?? theme.highlightColor,
splashColor: splashColor ?? theme.splashColor, splashColor: splashColor ?? theme.splashColor,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment