Bottom overloaded by 213 pixels in flutter

前端 未结 14 957
面向向阳花
面向向阳花 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:29

    wrap your child view into ListView will solve the prob. Please check this

     class _LoginScreenState extends State {
     @override
     Widget build(BuildContext context) {
        return new Scaffold(
        body: new Container(
         child: ListView(
           children: [
            Padding(
              padding: const EdgeInsets.all(8.0),
              child: new Column(
                crossAxisAlignment: CrossAxisAlignment.start,
                children: [
    
                    new Padding(
                      padding: EdgeInsets.only(left: 1,top: 50,right: 1,bottom: 1),
                      child: new Text("jk", style: TextStyle(fontFamily: "mono_bold")),
                    ),
    
                     new Padding(
                      padding: EdgeInsets.only(left: 1,top: 50,right: 1,bottom: 1),
                      child: new TextField(
                        style: new TextStyle(),
                          decoration: InputDecoration(
                            labelText: "Email",
                            contentPadding: EdgeInsets.all(8.0)
                        ),
                        keyboardType: TextInputType.emailAddress,
                      )
                    ),
                     new Padding(
                      padding: EdgeInsets.only(left: 1,top: 50,right: 1,bottom: 1),
                      child: new TextField(
                        style: new TextStyle(
    
                        ),
                        decoration: InputDecoration(
                          labelText: "Password"
    
                        ),
                        keyboardType: TextInputType.text,
                        obscureText: true,
                        ),
                    ),
                  ],
              ),
            ),
          ],
        )
      ),
    );
    }
    

提交回复
热议问题