CodeNewbie Community 🌱


Posted on

[Help] Flutter Dropdown

Hi All. This is my first time posting here, so pardon if this looks very messy. Below is my issue.

I want the the box dynamically fit the picked value, so it can grows bigger and smaller to fit its content.

Here is the box I mentioned:

The container box

The list of values:

The value list

How it looks like when each value picked:




Here is my code for review.

Is it possible with my code structure right now?

Please give me direction on what should I do to make it work (change widget is ok) or pointing me out where I did wrong.

Thanks a lot!

Top comments (2)

terabytetiger profile image
Tyler V. (he/him)

I'm very inexperienced with Flutter (I used it for 1 small project just to play with it once upon a time).

Perhaps this will help?

selly profile image

Hi thank you for responding.
I've tried the solution mentioned but they are not what I am expecting.
The closest is to change the itemHeight but it doesn't resize dynamically.