Search code examples
flutterkeyboardtextfieldsinglechildscrollview

Keyboard hide the textfield : SingleChildScrollView does not work


I am desperate to resolve this issue.

I made this simple page...

 return Scaffold(
      body:SingleChildScrollView(
        child:Column(children: [
          TextField(),
          TextField(),
          TextField(),
          SizedBox(height:200),
          TextField(),
          TextField(),
          TextField(),
        ],)
      )
    );

...and I tried all solutions from this post : Flutter TextFormField hidden by keyboard

Adding this property to my Scaffold :

resizeToAvoidBottomInset: false (or true)

Wrap the column with a bottom padding :

Padding(padding:EdgeInsets.only(bottom:MediaQuery.of(context).viewInsets.bottom), child:Column(),

Removing this line from styles.xml

<item name="android:windowFullscreen">true</item>

Is there any angel who can help me ? Can the problem come from elsewhere like manifest... I was not having this issue before, now I have it on all my forms !


Solution

  • The issue was coming from my AndroidManifest.xml. These two lines were missing.

    android:hardwareAccelerated="true"
    android:windowSoftInputMode="adjustResize"
    

    I removed it previously myself because I had this warning : "Attribute hardwareAccelerated is only used in API level 11 and higher (current min is 1)"