Reputation: 11
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.
Upvotes: 0
Views: 3065
Reputation: 11
i try any way for fix this problem. and i find a funny way, in my app i use a beautiful curved navigation bar package and when i deleted this and set default navigation bar in my app my problem solved
Upvotes: 0
Reputation: 41
Ercross's answer is correct(Weirdly Enough). I have a list of dynamically produced textFields, and I wanted to make them dismissable, upon using the Dismissible Widget it required a key parameter, which when made a const Key('test') made the error go away.
Upvotes: 0
Reputation: 81
please check your widget you are using textfeild in stateless widget just convert it into stateful widget.
Upvotes: 0
Reputation: 81
if your are using textformfeild in stateless widget then it give you this error , try to covert stateless widget to Stateful widget.
Upvotes: 2
Reputation: 646
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.
Upvotes: 0