Update parameters to the styleFrom button methods.#105291
Update parameters to the styleFrom button methods.#105291darrenaustin merged 3 commits intoflutter:masterfrom darrenaustin:m3_button_style_from
styleFrom button methods.#105291Conversation
|
This will require #105290 to land first, as the deprecation versions are now using beta releases, not dev releases. |
guidezpl
left a comment
There was a problem hiding this comment.
This is clean.
_ ___ _____ __ __
| | / __|_ _| \/ |
| |_| (_ | | | | |\/| |
|____\___| |_| |_| |_|
…l need to be migrated when flutter/flutter#105291 lands on stable.
…l need to be migrated when flutter/flutter#105291 lands on stable.
…l need to be migrated when flutter/flutter#105291 lands on stable.
…l need to be migrated when flutter/flutter#105291 lands on stable.
|
This PR appears to have broken the flutter-analyze bot on the Dart build system. Based on the log output: it appears that the flutter gallery app is still using This suggests that the flutter gallery app is not being analyzed as part of the build process, which might indicate a different kind of issue. |
|
You may want use pinning to allow fixes for changes such as this to get in without breaking builds. See also https://github.com/flutter/gallery#tests. |
|
@athomas for the previous comment. |
|
The point of the multi headed testing is to detect problems before the rolls, and pinning would defeat that. |
|
Looks like some of the API docs still refer to |
* Update parameters to the `styleFrom` button methods. * Updated the Flutter fix data to point to this PR. * Updated handling of background color to better maintain backwards compatibility with previous API.
…s from `ElevatedButton.styleFrom` (#5566) This PR is to remove deprecated `primary` and `onPrimary` references([deprecation PR](flutter/flutter#105291)) from `ElevatedButton.styleFrom`. `primary` should be replaced with `backgroundColor` and `onPrimary` should be replaced with `foregroundColor`. No new tests needed. Please let me know if I incorrectly handled the CHANGELOG and version change.
To make the common button
.styleFrommethods a little easier to use, this PR adds the following parameters to each ofElevatedButton.styleFrom,OutlinedButton.styleFromandTextButton.styleFrom:If given they will be used to construct foreground and background MaterialStateProperty colors for the style. These replace
primary,onPrimary, andonSurfacewhich are deprecated.To update your apps to use these new parameters you can either use the quick fix feature of your IDE, or use Flutter Fix to apply the given fixes to your entire project.
Pre-launch Checklist
///).