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
FlatButton introduces phantom padding #3678
Comments
You want to use InkWell rather than FlatButton. |
(Leaving this open to see if there's a way we can make that more obvious in the code, maybe limiting FlatButton to Text or something. See also #3681 for docs clarification.) |
InkWell works excellently for this, thanks! I think it would be more obvious if the Widget's name included "Button" in it. My decision process for figuring out what widget to use for my use case was to look up everything with Button in its name in Flutter's material library. |
Moving this to API stability so we can make a determination of what to do. It might just be docs improvements and/or no change, though. |
IMHO, the solution here is to improve the button docs to point to InkWell and GestureDetector for these use cases. |
Looks like we have these docs now. |
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 |
Problem
I've built a card that highlights the 3 most- and least-exemplary leaves in the leafy app, which consists of showing the leaf's name and the leaf's value. This works very nicely -- I have a short list of Rows with a left- and right-aligned pair of text views for the leaf name and leaf value.
However, when I added support for clicking into the leaf to see details on its value, the FlatButton I wrapped each row in padded the row, which breaks the nice alignment I had.
My ask
A way to give a Widget an onPressed event without Flutter padding it.
The text was updated successfully, but these errors were encountered: