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.
There's currently an ongoing issue in the flutter GitHub repo about this problem. It isn't solved as of yet, but there's a convenient workaround in place this comment implies.
You can add FocusManager.instance.primaryFocus.unfocus();
to the onTap()
event of your DropdownButton that should 'steal' focuses off of the TextField that was previously focused on the dropdown tap.