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
IconButton's splash radius is too large on an AppBar #64702
Comments
Possibly related to inactive issue - #31194 |
Hi @sidrao2006, |
It was easier to use a dartpad for this as there were very few changes needed. Changes made
|
Why not just set the splashSize property to your desired value? |
@dnfield it is not possible to the |
Ahh, ok. It sounds like I did check on some other Android apps and it looks ike the splash does not typically overflow the bar. That said, app bars can be different sizes, and some people may want the overflow, so whatever is done here shouldn't be a change to defaults on /cc @willlarche @rami-a who might know the right person on the Material team to look at this. |
Also, based on a quick look at this code: https://github.com/flutter/flutter/tree/master/packages/flutter/lib/src/material/ink_highlight.dart#L122 Seems a little fishy to me - I wonder if there's some way we should be making sure that the highlight is drawn as a percentage of the constraints rather than as a fixed amount. |
Thanks for bringing this up @sidrao2006. I think that there's definitely an improvement we can make here to allow for the out-of-the-box IconButtons inside app bars (Back button, menu button) to use a smaller splash radius. I've reached out to our designers to get some additional guidance on this and I'll report back once I have some. |
I think I was able to get somewhere, taking @dnfield 's suggestion in mind. Now, I just need to run some tests |
I thought we did follow the specs... they may have changed, though. Do you have a link to the spec we should follow? |
As far as how to control the splash size, that seems like something that we should put in the theme. cc @HansMuller |
@Hixie , thanks for replying, as I have mentioned, flutter indeed does follow the material spec. Amazing, I look into the themes and open a pr. But I am still confused whether to apply that to all the |
This is how it looks on latest stable (1.20.2) when we tap on iconButton in appbar: flutter doctor -v
|
@HansMuller, @dnfield , @Hixie can you please review my solution plan
On approval, I will add these to my PR's TODO. |
@rami-a is working with designers to confirm the spec. The specs change and what's published isn't always the latest guidance. We're proud that on Flutter we often get the latest guidance before it's even published so our clients can have the benefit of new features and improvements. Also, sometimes the spec does change without alerting us that we need to make a code change. This happens much less often these days but happened a lot in earlier years. Either way, we need to confirm what the designers want us to do here. And @rami-a is working on that. So, sit tight and we'll get back to you when this information request comes up in the queue! |
#93478 landed |
#93478 is reverted, I am working on reimplementation |
What is the status of this? Thanks |
The PR is reverted, so I re-opened this issue. Will add a reland soon. |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
The IconButton does follow the default material specs and has a splash radius of about 24px. This is definitely not suitable for auto generated icons like the back button and the scaffold drawer button.
Though the material design does specify a set splash radius, an overflow is definitely not intended. The icon button's splash always overflows in
AppBar
s.Possible solutions -
Allow setting the default splash radius for all auto generated icon buttons in
AppBar
s.Set the default splash radius so that it doesnt overflow atleast - in the defaul
AppBar
The text was updated successfully, but these errors were encountered: