Bottom overloaded by 213 pixels in flutter

前端 未结 14 964
面向向阳花
面向向阳花 2021-02-01 02:04

Hi I am trying to create login screen. It is working fine for me. When I open the keyboard then it is giving me an error Bottom overloaded by 213 pixels.

         


        
14条回答
  •  我在风中等你
    2021-02-01 02:23

    wrap your column into SingleChildScrollView will solve the problem. Please check this:

     Widget build(BuildContext context) {
        return Scaffold(
            body: Container(
                child: Center(
                    child: SingleChildScrollView(
              child: Column(
                mainAxisAlignment: MainAxisAlignment.center,
                children: [
                  TextField(),
                  TextField(),
                ],
              ),
            ))));
      }
    

    And You also use for removing yellow black overflow line

    resizeToAvoidBottomPadding: false 
    

    but in this case, TextField does not move up on click time.

提交回复
热议问题