我才刚刚开始学Flutter 翼.我目前正在try 让一个文本小部件在一行内的两个容器之间溢出.
代码如下:
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
color: Colors.green,
width: 100.273,
height: 150,
child: const Text(
"Test",
overflow: TextOverflow.visible,
style: TextStyle(
color: Colors.black,
decoration: TextDecoration.none,
),
),
),
Container(
color: Colors.white,
width: 100,
height: 150,
),
],
),
我try 使用不同的小部件来培育容器,并try 了不同的TextOverflow值.Visible和Clip似乎不做任何事情.try 将文本小部件向上移动到行,然后使其在两个容器之间进行裁剪,但也不起作用.
这是目前的布局,我希望测试中的绿色容器能够夹进白色的容器.
[]