底部溢出100.0像素

时间:2020-11-11 12:40:25

标签: flutter

我有这个用户界面:UI

即使我将maxlines设置为3,文本也会显示此黄色条。 我把它们放在一个容器里,它仍然像这样!

child: Container(
                                  height: 150,
                                  width: 200,
                                  child: Column(children: [
                                    Text(
                                      allRecipes[index].name,
                                      style: TextStyle(color: Colors.black54,
                                      fontSize: 20,),
                                    ),
                                    Text(
                                      allRecipes[index].about,
                                      softWrap: true,
                                      maxLines: 3,
                                      style: TextStyle(
                                      fontSize: 14,)
                                    ),

此外,我需要您的帮助,以便在食物卡之间留出更多空间?

1 个答案:

答案 0 :(得分:0)

这是因为您的集装箱高度。 尝试增加它并检查,

您的集装箱高度为150 根据您的设计要求将其增加200或250。

                          Container(
                                  height: 250,//like this
                                  width: 200,
                                  child: Column(children: [
                                    Text(
                                      allRecipes[index].name,
                                      style: TextStyle(color: Colors.black54,
                                      fontSize: 20,),
                                    ),
                                    Text(
                                      allRecipes[index].about,
                                      softWrap: true,
                                      maxLines: 3,
                                      style: TextStyle(
                                      fontSize: 14,)
                                    ),
                                  ]
                                 )