New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor ToggleButtons (remove RawMaterialButton)
#99493
Refactor ToggleButtons (remove RawMaterialButton)
#99493
Conversation
8058dd0
to
2f79f04
Compare
NICE - all of the existing golden file tests pass!
Comparing this to the same refactor you are doing for FAB (#99753)
- FAB is not becoming a
ButtonStyleButton, but here it looks likeToggleButtonsare. - FAB is not going to have a
ButtonStyle styleparameter like here, instead deferring to its numerated properties and inherited theme to create a ButtonStyle internally. ToggleButtons here allow for style to be set OR individual properties + theming.
I wonder if the FAB approach is cleaner, the style property here on ToggleButtons might not be necessary, but again I will defer to @HansMuller on general design since he wrote the model.
All of this work in FAB & Toggle is really great progress though. Thanks!
|
We should make sure that this PR also fixes #97302 |
|
I agree with Kate, this PR shouldn't include the extra step of adding a ButtonStyle |
74a9652
to
4b1618d
Compare
This is now handled by MobileDesktop (Web) |
|
@TahaTesser - if this PR fixes #97302 it should say so in the PR's description and it should include a regression test (marked as a regression test for #97302 with a comment). |
|
@TahaTesser - the screenshots in #99493 (comment) imply that the background color for the ToggleButtons isn't clipped to the ToggleButtons' shape? |
|
@HansMuller
This is just a parent container with color from #97302 ClipRRect still clipping the toggle buttons in this refactor |
|
@TahaTesser - Good! |
|
@HansMuller |
9d5b89e
to
4284e86
Compare
|
@HansMuller Filed #100124, this will land after this PR (tester finders look for |
This is looking good however I don't think the style parameter belongs in this PR; see #99493 (comment)
4284e86
to
21d345d
Compare
My apologies I missed removing that parameter, done. |
@TahaTesser is this ready for another review? Or is it waiting on additional changes like the FAB one?
Hey @Piinks! This |
|
@TahaTesser - I haven't tested or even compiled the code I've suggested for the _ForegroundColor and _BackgroundColor. If they're difficult let me know and I'll fix them. |
213dfc0
to
9db5792
Compare
This is cleaner, thanks! |


fixes #99085
fixes #97302
minimal code sample
Description
Here this PR refactors
ToggleButtonsand useButtonStyleButtonto styleToggleButtonshighlight color not being translated to ElevatedButton (
ButtonStyleButtonsets highlight color to be transparent).Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.