How to Easily Dismiss the Keyboard with Swipe Down in Flutter

July 30, 2020

Keyboards are sticky things. Sometimes they stick around when you don’t want them to or won’t go away when you tap and ask them to.

That doesn’t necessarily have to be the case.

Android users have it easy honestly (don’t worry I am one😅). They have a button in the bottom left to just dismiss the keyboard if they want or a quick tap on the back button and poof 💨 it’s gone. On iOS some apps are thoughtful and give the user the ability to swipe the keyboard down and out of the way, others…not so much. The advantage of Flutter is that you can give both users the same experience and, with it being Flutter, you only have to write the solution once.

Check out the YouTube tutorial I made to show how to fix this issue!

Source code from the video