Created
February 1, 2022 10:34
-
-
Save saliouseck2009/2c39328a1f9b00cf22f24ebc492a719f to your computer and use it in GitHub Desktop.
Dismiss keyboard in flutter App
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FocusManager.instance.primaryFocus?.unfocus() | |
#use cases | |
return GestureDetector( | |
onTap: () => FocusManager.instance.primaryFocus?.unfocus(), | |
child: Scaffold( | |
appBar: AppBar( | |
title: Text('Login'), | |
), | |
body: Body(), | |
), | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment