I am trying to write a flutter application where I need to know whether a DropdownButton is currently opened and displaying all of the options or not.
On the official flutter github page there is an issue where developers say that the selectedItemBuilder option should be able to carry out the functionality of the callback of the button being opened or closed, but after going to the page they linked I simply could not figure out how to achieve the functionality. The function is not even called if I close the dropdown by pressing outside of it.
Does anyone know how this can be achieved?
Try this: