I have a textfield and a dropdownbutton on a screen. When I move from the textfield to choose an item and then back to the textfield I find this a little bit awkward.
Sorry for the late Answer... I'm also finding the solution for this. now i get it.
Only you have to add this
FocusScope.of(context).requestFocus(new FocusNode());
in your
_dropdownChange(val)
method
void _dropdownChange(val) {
setState(() {
FocusScope.of(context).requestFocus(new FocusNode());///It will clear all focus of the textfield
selectedDropdown = val;
});
}
also refer Abdul Wahab answer