Skip to content Skip to sidebar Skip to footer

A Renderflex Overflowed By 40 Pixels On The Bottom Problem

Another exception was thrown: A RenderFlex overflowed by 40 pixels on the bottom. I am getting this error. Please someone help me. I am new in flutter. I did change lots of things

Solution 1:

Try this, it will look like this:

  @override
  Widget build(BuildContext context) {
    final Size screenSize = MediaQuery.of(context).size;

    return Card(
      child: Row(
        children: <Widget>[
          new SizedBox(
            width: (screenSize.width / 5) * 4.3,
            child: ListTile(
              //Leading Section
              leading: new Image.asset(
                cart_prod_picture,
                width: 80.0,
                height: 80.0,
              ),
              //Title Section
              title: new Text(cart_prod_name),
              //Subtitle Section
              subtitle: new Column(
                children: <Widget>[
                  new Row(
                    children: <Widget>[
                      new Padding(
                          padding: const EdgeInsets.all(0.0),
                          child: new Text("Size:")),
                      new Padding(
                          padding: const EdgeInsets.all(4.0),
                          child: new Text(
                            cart_prod_size,
                            style: TextStyle(color: Colors.red),
                          )),

                      //For Product Color
                      new Padding(
                        padding: const EdgeInsets.fromLTRB(20.0, 8.0, 8.0, 8.0),
                        child: new Text("Color:"),
                      ),
                      new Padding(
                        padding: const EdgeInsets.all(4.0),
                        child: new Text(cart_prod_color,
                            style: TextStyle(color: Colors.red)),
                      )
                    ],
                  ),

                  // This is for product price
                  new Container(
                    alignment: Alignment.topLeft,
                    child: new Text(
                      "$cart_prod_price\₺",
                      style: TextStyle(
                          fontSize: 17.0,
                          fontWeight: FontWeight.bold,
                          color: Colors.red),
                    ),
                  )
                ],
              ),
            ),
          ),
          new SizedBox(
            width: 49.0,
            child: new Column(
                children: <Widget>[
                  new IconButton(icon: Icon(Icons.arrow_drop_up), onPressed: () {}),
                  new Text("$cart_prod_quantity"),
                  new IconButton(icon: Icon(Icons.arrow_drop_down), onPressed: () {})
                ],
            )
          )
        ],
      ),
    );
  }

Post a Comment for "A Renderflex Overflowed By 40 Pixels On The Bottom Problem"