Flutter Multiline for text

前端 未结 8 936
春和景丽
春和景丽 2021-02-06 22:23

All I need is my text to be multi-line. Am giving the property of maxLines but its still getting RenderFlex overflowed error to the right as the next i

8条回答
  •  别跟我提以往
    2021-02-06 22:47

    I think you forgot to add overflow type.

    You can use something like this:

    Text(
         "TOP ADDED",
         textAlign: TextAlign.justify,
         overflow: TextOverflow.ellipsis,
         style: TextStyle(fontSize: 18.0),
         maxLines: 2,)
    

提交回复
热议问题