Migrate IconButton to Material 3 - Part 2#106437
Migrate IconButton to Material 3 - Part 2#106437auto-submit[bot] merged 7 commits intoflutter:masterfrom
IconButton to Material 3 - Part 2#106437Conversation
IconButton to Material 3 - Part 2
1fb49cc to
b14a273
Compare
darrenaustin
left a comment
There was a problem hiding this comment.
Overall this looks good. Nice work.
I have some comments and questions below.
There was a problem hiding this comment.
This is fine for this PR, but thinking more about this, perhaps we should have the IconButton override the density that is used by ButtonStyledButton to always use standard, as I am not sure it makes sense to apply density to icon buttons. We should talk with @gspencergoog about this.
There was a problem hiding this comment.
There is a lot of common code for each of these button types. In fact it looks like the only difference is the ButtonStyle. Perhaps it would be simpler to have a single DemoIconToggleButton class that you pass in different ButtonStyles to instead of multiple classes doing the same thing.
There was a problem hiding this comment.
I see. Thanks for the suggestion! I added the change. Please let me know if there's any questions:)
b14a273 to
92b0d01
Compare
darrenaustin
left a comment
There was a problem hiding this comment.
LGTM. Nice work. Just a minor doc update below. Thx.
c7d455c to
63b3be9
Compare
|
resolves #103528
This PR is the second part of the
IconButtonmigration. In this PR, aIconButtoncan be turned into a "toggle button" by usingisSelectedparameter.The boolean
isSelectedis a new parameter inIconButtonclass. The button will be non-toggle button by default ifisSelectedis not set; otherwise, the button will show the selection state based on the value ofisSelected.Pre-launch Checklist
///).