I was using a text field when I encountered this problem. I have placed a flat button below my text field. Now, what has happened is that when I tap on the text field to write anything, my mobile keyboard appears. Everything seems normal until here. Now after I enter any data in my text field and press on the done button on the mobile keyboard, the mobile keyboard disappears. And I can press on the flat button below the text field. If I do this, everything is performed smoothly. BUT......... When I enter any data in my text field, and if I directly tap on the flat button that I placed, without pressing on the done button on the mobile keyboard, then I get to see an overflow message for a second. Though the overflow message is seen just for a second, it is still annoying. I don't know what I should do. Please help me. I have attached a small video link that shows the problem. In the video recording i have tapped on the done button on the mobile keyboard and tapped on the flat button. Then, the second time, I have again typed something on the text field and without pressing on the done button, I have tapped on the flat button. You will also see the overflow warning. Please help me friends. Thanks!!
Container(
padding: EdgeInsets.all(20.0),
child: TextField(
style: TextStyle(
color: Colors.black,
fontSize: 18,
),
decoration: kTextFieldInputDecoration,
onChanged: (value) {
cityName = value;
},
),
),
SingleChildScrollViewin your code.