Answers for "text field keyboard dismiss in flutter"

1

dismiss keyboard flutter

// The correct way of closing the keyboard is

FocusScope.of(context).unfocus();
Posted by: Guest on June-19-2021
0

Keyboard disappearing when focussing on TextFormField flutter

This happens when you put GlobalKey<FormState> in your build function

Try with static or add inside initState ... _formKey ...

static GlobalKey<FormState> _formKey = new GlobalKey<FormState>();

Currently the key is recreated every time _LoginState is rebuilt, which defeats
it's purpose.
Posted by: Guest on July-11-2021

Code answers related to "text field keyboard dismiss in flutter"

Code answers related to "Dart"

Browse Popular Code Answers by Language