如何解决此错误(RenderFlex在底部溢出了104个像素。)

时间:2019-09-16 02:28:11

标签: flutter widget trailing

enter image description here

  

此(在ListTile中进行跟踪)   在Flutter中

import Inc from "mongoose-sequence";
import { userSchema } from "../SOME-MONGOOSE-SCHEMA.ts";
const AutoIncrement = Inc(userSchema);

2 个答案:

答案 0 :(得分:1)

 trailing: Column(
          mainAxisAlignment: MainAxisAlignment.start,
          mainAxisSize: MainAxisSize.min,
          children: <Widget>[
            Expanded(
                  child: new IconButton(
      padding: EdgeInsets.zero,
      icon: Icon(Icons.arrow_drop_up), onPressed: (){}),
            ),

            Expanded(child: Text("Hello")),
            Expanded(child: new IconButton(icon: Icon(Icons.arrow_drop_down), onPressed: (){})),


          ],
        ),

答案 1 :(得分:-1)

    trailing: FittedBox(
      fit: BoxFit.fill,
      child: Column(
        children: <Widget>[
          new IconButton(icon: Icon(Icons.arrow_drop_up, size: 50.0,), onPressed: (){}),
          new Text("${cart_prod_qty}", style: TextStyle(fontSize: 25.0),),
          new IconButton(icon: Icon(Icons.arrow_drop_down, size: 50.0,) , onPressed: (){}),
        ],
      ),
    ),