-
Notifications
You must be signed in to change notification settings - Fork 27.1k
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
Dropdownbutton does not pop up on tap #54951
Comments
@maheshmnj
|
@VladyslavBondarenko thank you very much for the prompt reply,I was actually editing the post and accidently submitted, that caused a little confusion,I have updated the issue with little detail can you please check it and reopen the issue |
@maheshmnj |
sure I will do that |
@VladyslavBondarenko I was able to reproduce the issue with a minimal code can you please check this out https://github.com/maheshmnj/flutter-dropdown-issue-54951 this is the exact code that I have in my project heres the output |
@VladyslavBondarenko I found the issue,I am actually loading the list data from the network and while the data is being loaded the dropdown has an empty list and The dropdown remains in empty state and probably when it has empty list it remains disabled and once the list is available with the data from network to render it inside the dropdown we have to call setState (This was missing in my code,need to call setState as soon as list has the data from network) so you can mark this issue as resolved and close the issue |
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 |
I have a dropdown widget I understand that we have to call setState to change the value of the dropdown widget but the thing is dropdown isnt popping up in the first place in the UI until someother widget does the setState in the same Widget.
I have a counter widget just like the flutter counter app and in the same widget I also have a dropdown widget ,The dropdown widget doesnt pop up, on tap but when I hit the counter widget( which calls the setstate to change the counter value ),After that the dropdown widget is available to access.seems like the dropdown is disabled until the first setstate in the widget
I have other dropdowns in the app it seems to work well but I am scratching my head since few hours to find out whats the issue
here is my dropdown widget
quantity widget // ontap calls setState which allows interaction with the dropdown
heres my flutter doctor output
if you see in the above gif the dropdown gets enabled as soon as setstate is called by the counter widget .
the image before the counter widget calls to setstate
please let me know if you need some more info to figure out the issue.
The text was updated successfully, but these errors were encountered: