使用 web flutter,当我显示文本时,我的文本在底部被剪切,我试图放置填充,但它不起作用。
这个问题这个产品无处不在,甚至在 TextField 上
new Container(
width: menuRightWidthDesktop,
height: getSize == 0 ? heightHeaderDesktop : getSize == 1 ? heightHeaderTablette : heightHeaderMobile,
color: Colors.red,
child: new Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
new GestureDetector(
child: new Container(
color: Colors.indigoAccent,
child: new Text("Surfeur >"),
),
onTap: () {},
),
new GestureDetector(
child: new Text("Photographe >", ),
onTap: () {},
),
],
),
),
最佳答案
我一直有同样的问题,并通过增加 解决了它高度 文本属性由一个小值
Text("Surfeur >",
style: TextStyle(
height: 1.1,
),
),
关于网页 flutter : text cut off at bottom,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59672179/