Flutter: RenderPointerListener object was given an infinite size during layout

Viewed 28

I started to make a login page and in the first time I run it it run as what I was expected. I realize that my code must be stateful because i must add animation in password visibility. But, when I started to convert Loginpage from stateless to stateful widget . There so many eror in Debug Consol but there's nothing error in IDE. I try to convert back to stateless widget but it show same error.

Here is my loginpage code:

Above Widget Build

Widget build(BuildContext context) {
return Scaffold(
    body:SingleChildScrollView(
      child: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            Container(
              margin: EdgeInsets.only(top: MediaQuery.of(context).size.height * 0.15),
              child: Image(image: AssetImage("assets/image/logo/Logo.png")),
            ),
            Row(
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                Text("SIDIGS", style: TextStyle(fontSize: 42, fontWeight: FontWeight.w700, fontFamily: "Poppins",color: HexColor("0075B0")),),
                Text(".", style: TextStyle(fontSize: 42, fontWeight: FontWeight.w700, fontFamily: "Poppins",color: HexColor("FFB401")),)
              ],
            ),
            Text("WALI MURID",
              style: TextStyle(
                  fontSize: 24,
                  fontWeight: FontWeight.w700,
                  fontFamily: "Poppins",
                  foreground: Paint()..shader = linearGradient),),
            Container(
                margin: EdgeInsets.fromLTRB(20, 100, 20, 10),
                padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
                child: Column(children: [
                  Align(
                    alignment: Alignment.topLeft,
                    child:Text("Username", style: TextStyle(color: HexColor("#526789"),fontFamily: "Poppins"),),),
                  Stack(
                    children: [
                      Container(

                        padding: EdgeInsets.fromLTRB(70, 0, 10, 0),
                        decoration: BoxDecoration(
                          color: Colors.white,
                          border: Border.all(color: Colors.grey),
                          borderRadius: BorderRadius.circular(8),
                        ),
                        child: TextField(
                          decoration: InputDecoration(
                            hintText: "Username",
                            hintStyle: TextStyle(fontFamily: "Poppins"),
                            border: InputBorder.none,
                          ),
                        ),
                      ),
                      Align(
                        alignment: Alignment.topLeft,
                        child: Container(
                          margin: EdgeInsets.fromLTRB(0, 0, 20, 0),
                          padding: EdgeInsets.fromLTRB(10, 6, 10, 10),
                          decoration: BoxDecoration(
                              color: Colors.white,
                              border:Border.all(color: Colors.grey),
                              borderRadius: BorderRadius.circular(8)
                          ),
                          child: Icon(Icons.person,size: 32,color:Colors.grey),
                        ),
                      ),
                    ],
                  )
                ],)
            ),
            //Password
            Container(
                margin: EdgeInsets.fromLTRB(20, 18, 20, 10),
                padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
                child: Column(children: [
                  Align(
                    alignment: Alignment.topLeft,
                    child:Text("Password", style: TextStyle(color: HexColor("#526789"),fontFamily: "Poppins"),),),
                  Stack(
                    children: [
                      Container(

                        padding: EdgeInsets.fromLTRB(70, 0, 10, 0),
                        decoration: BoxDecoration(
                          color: Colors.white,
                          border: Border.all(color: Colors.grey),
                          borderRadius: BorderRadius.circular(8),
                        ),
                        child: TextField(
                          obscureText: true,
                          decoration: InputDecoration(
                            suffixIcon: GestureDetector(onTap: (){

                            },),
                            hintText: "Password",
                            hintStyle: TextStyle(fontFamily: "Poppins"),
                            border: InputBorder.none,
                          ),
                        ),
                      ),
                      Align(
                        alignment: Alignment.topLeft,
                        child: Container(
                          margin: EdgeInsets.fromLTRB(0, 0, 20, 0),
                          padding: EdgeInsets.fromLTRB(10, 6, 10, 10),
                          decoration: BoxDecoration(
                              color: Colors.white,
                              border:Border.all(color: Colors.grey),
                              borderRadius: BorderRadius.circular(8)
                          ),
                          child: Icon(Icons.key,size: 32,color: Colors.grey,),
                        ),
                      ),
                    ],
                  )
                ],)
            ),
            SizedBox(
              width: MediaQuery.of(context).size.width *0.85,
              height: 72,
              child: Container(
                margin: EdgeInsets.fromLTRB(0, 12, 0, 8),
                decoration: BoxDecoration(
                  borderRadius: BorderRadius.circular(8),
                  gradient: LinearGradient(
                    colors: [HexColor("9DBE16"), HexColor("539401")],
                    begin: Alignment.topCenter,
                    end: Alignment.bottomCenter,
                  ),

                ),
                child: Material(
                  borderRadius: BorderRadius.circular(8),
                  color: Colors.transparent,
                  child: InkWell(
                      borderRadius: BorderRadius.circular(8),
                      splashColor: Colors.amber.withOpacity(0.7),
                      onTap: (){},
                      child:Center(
                        child: Text("LOGIN", style: TextStyle(color: Colors.white,fontWeight: FontWeight.w700,fontFamily: "Poppins"),),
                      )
                  ),
                ),
              ),
            ),
            Text("Dengan masuk atau mendaftar, anda menyutujui",style: TextStyle(color: Colors.black,fontWeight: FontWeight.w400,fontFamily: "Poppins",fontSize: 12),),

            Row(
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                Text("Ketentuan Layanan ", style: TextStyle(color: HexColor("#009ADE"),fontWeight: FontWeight.w400,fontFamily: "Poppins",fontSize: 12,),),
                Text("dan ",style: TextStyle(color: Colors.black,fontWeight: FontWeight.w400,fontFamily: "Poppins",fontSize: 12),),
                Text("Kebijakan Privasi", style: TextStyle(color: HexColor("#009ADE"),fontWeight: FontWeight.w400,fontFamily: "Poppins",fontSize: 12,),),
                Text(".",style: TextStyle(color: Colors.black,fontWeight: FontWeight.w400,fontFamily: "Poppins",fontSize: 12),),
              ],
            ),
            Container(
              margin: EdgeInsets.fromLTRB(0, 24, 0, 0),
              child:Row(
                mainAxisAlignment: MainAxisAlignment.center,
                children: [
                  Text("Lupa Password? ",style: TextStyle(color: Colors.black,fontWeight: FontWeight.w500,fontFamily: "Poppins",fontSize: 12),),
                  Text("Klik Disini", style: TextStyle(color: HexColor("#009ADE"),fontWeight: FontWeight.w700,fontFamily: "Poppins",fontSize: 12,decoration: TextDecoration.underline),),
                ],
              ) ,
            )

          ],
        ),
      ),
    )
);

and here is my debug console:

RenderPointerListener object was given an infinite size during layout.

RenderBox was not laid out: _RenderDecoration#4f4a9 relayoutBoundary=up24 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE

here is full debug console

Debug Console Google Docs

0 Answers
Related