How to reset the dropdown button in flutter?

1.1k Views Asked by At

I have a dropdown button which works fine when I visit the page(having the button) first time but whenever i revisit the page containing the dropdown button, the previously selected value appears rather than the hint text which i want to appear every time the page is visited.

1

There are 1 best solutions below

2
On BEST ANSWER

Dropdown button has a property value where we specify our variable to get the selected value. Before moving to the next screen you can set back the default value to it and it should work.