当我将一个文本小部件配置为最多1行,并将溢出设置为省略号时,小部件会正确显示。
Text(
"Last summer, I was working on a prototype for an AR app that would allow users to create
virtual objects in real world spaces. I carried out the work using the Unity3D game engine.
My last commit to the repository was five months ago.",
maxLines: 1,
overflow: TextOverflow.ellipsis
)
然而,当我将最大行数设置为大于1的任何数字时,行数会正确限制,但溢出省略号不会显示。
Text(
"Last summer, I was working on a prototype for an AR app that would allow users to create
virtual objects in real world spaces. I carried out the work using the Unity3D game engine.
My last commit to the repository was five months ago.",
maxLines: 2,
overflow: TextOverflow.ellipsis
)
如何配置Text小部件,在设置maxLines为多行时显示溢出省略号?