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
Setting a decent label is a nightmare! #107
Comments
Wrap your
|
That's correct. |
Btw, as you have padding for the contents anyway, why not using contentPadding of left and only use right padding for the hint/contents ? |
I don't think I understood this properly. Anyway, here is my content padding in the |
Can you share a small sample code ? |
Here's an example (hence: contentPadding, itemPadding, dropdownWidth and offset properties):
|
I've created this widget as a sample taking the same properties as that in my actual code.
|
same idea :)
|
Awesome! However, just out of curiosity, if in above code, I remove |
When both so that behavior is necessary for another use case not yours. Adding any |
All that tricky work is necessary because of the need to add contentPadding in your case. which is added to the |
After having a better clarity on these concepts, I've further finetuned the UI by adding an icon on the left of the I must say I've learned a lot about this widget today and I'll be way more confident and comfortable using it in future. Thanks a lot for taking time to explain the underlying concepts and providing a fix suitable to my particular use case. |
Hi,
Thanks for such a nice and customizable widget.
There is just one issue that at least I couldn't fix even after trying every option that seemed relevant.
In case of
DropdownButtonTextField2
, when we addlabel
in thedecoration
, it aligns to the extreme left. If we try to apply a padding viacontentPadding
, it duly applies to the label but then, the dropdown menu and the contents of the button also get padding on the left.After a lot of tries, I've finally decided to not use label at all.
Can you pl look into it and provide a fix for that?
Thanks
The text was updated successfully, but these errors were encountered: