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.
@Dithest answer is correct but one problem still in this use case is when user tap outside of drop down menu then text field refocus and keyboard open . My work around of this issue is to add following code as well in onTap Listener of DropDownButton
FocusScope.of(context).requestFocus(new FocusNode());
///It will clear all focus of the textfield