How to hide keyboard in Flutter

Working with TextField and Textformfield requires us to handle keyboard popup’s behavior. Dismissing it at the right time can smooth a user’s form input process.

We can hide the keyboard by 2 ways.

FocusScope.of(context).requestFocus(new FocusNode());
FocusScopeNode currentFocus = FocusScope.of(context);

Leave a Comment

Your email address will not be published. Required fields are marked *

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.