Reputation: 131
while cooming back from any screen to homescreen my keyboard pop-ups automatically which makes user experience bad.
Can someone tell me how to deal with this bug.
Upvotes: 2
Views: 1208
Reputation: 1
hooman's answer is true. and in bottom navigation,put code in bottomNavigation ontap.
onTap: (index) {
setState(() {
selectItem = index;
FocusManager.instance.primaryFocus?.unfocus();
});
Upvotes: 0
Reputation: 803
you can run this code everywhere you change page:
FocusManager.instance.primaryFocus?.unfocus()
Upvotes: 7