'my keyboard opens and closed when i click on TextField in flutter

When I use the text field in each part of my program and run the program, the keyboard immediately opens and closes and doesn't give me a chance to type anything. I use version 1.17 of the Flutter SDK. Is there a problem with the widgets I use? I've used Material, Scaffold, SingleChildScrollView widgets, but my problem is still unresolved.



Solution 1:[1]

i try any way for fix this problem. and i find a funny way, in my app i use a beautiful curved navigation bar and when i deleted this and set default navigation bar in my app my problem sol

Solution 2:[2]

In my own case, I had this key: ValueKey<int>(math.Random().nextInt(5)), as the key for an ancestor widget of the TextFormField. I removed it and the error no longer appeared. So my debug suggestion is to check all widgets, in the widget tree, that has any value passed for its key argument.

Solution 3:[3]

if your are using textformfeild in stateless widget then it give you this error , try to covert stateless widget to Stateful widget.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 sajjad hajizadeh
Solution 2
Solution 3 kaleem ullah