andyduke / styled_text_package

Text widget with formatted text using tags. Makes it easier to use formatted text in multilingual applications.
https://pub.dev/packages/styled_text
BSD 3-Clause "New" or "Revised" License
75 stars 48 forks source link

maxLines doesn't work for web #26

Closed sumitasharma closed 3 years ago

sumitasharma commented 3 years ago

Hi,

maxLines for web is not working if the text has multiple line text but the first line isn't long enough for the container that holds the text in it. ex. If my text has 4 lines but the first line is short, maxLines doesn't work and shows the entire text.

I made changes to Container size to make the maxLine work. Container(width: (myText.toString().split('\n')[0].length > 70) ? 680 : 600) Thanks

andyduke commented 3 years ago

@sumitasharma Is this problem still after upgrading to Flutter 2.0?

sumitasharma commented 3 years ago

Hi Andy, Yes, it is worrking in Flutter 2. Thanks