<p dir="auto">I just noticed today that it is nearly impossible to give a RaisedButton a gradient. So I'm asking that BoxDecoration, or a Gradient property, be added to all material components.</p>
<p dir="auto">Internal: b/141787699</p>
<p dir="auto">Flutter doesn't have a good way of decorating a button with something that isn't a flat color. This is because the underlying Material widget doesn't allow for it.</p>
<p dir="auto">Right now we just stack a DecoratedBox behind a MaterialButton with a transparent background. This works for our larger buttons, but fails for our smaller buttons, since the MaterialButton pads the height up to 48dp. This makes the button look like a regular sized button and there's no reasonable way to workaround it.</p>
<p dir="auto">A proper fix would be to allow a BoxDecoration to be specified in ButtonThemeData. Then we can remove the Stack + DecoratedBox workaround.</p>
<p dir="auto">Related to or same as <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="354852199" data-permission-text="Title is private" data-url="https://github.com/flutter/flutter/issues/21125" data-hovercard-type="issue" data-hovercard-url="/flutter/flutter/issues/21125/hovercard" href="https://github.com/flutter/flutter/issues/21125">#21125</a></p>