-
-
Notifications
You must be signed in to change notification settings - Fork 876
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
maxLines parameter TextStyle is not working as intended. #29
Comments
Are you trying to limit the whole html document to maxLines? |
Yes. Is there better work around for this ? |
Not really, the defaultTextStyle applies to each text node individually, so the entire html document is hard to limit. What do you want the html document to do if it exceeds maxLines? |
my usecase to have ellipsis at the end after document exceeds maxLines. |
Yes, I see how that could be useful. I'll look into adding that as a feature. |
Hi @Sub6Resources, Thank you! |
Same here |
@PalaniArunagiri and @dariotrombello I'm currently in school full time and working part time as well so I don't have much time to work on this. Unfortunately, the widget doesn't have any sort of concept of the number of lines at the moment, so this isn't an easy fix. I've increased the priority of this feature request and added a "help wanted" label to attract attention to this issue for potential collaborators. If anybody has more time than I do and wants to take a shot at it, that would be awesome. |
Any updates on this feature? |
I am not sure if we can support max-lines in any meaningful way, really. For a simple single piece of text this seems intuitive, but what does max-lines mean in the context of html tables, image, summary/details, lists... Wouldn't you rather have a max height? |
#596 has been merged, this brings basic support for maxlines on text nodes. You can use the Html(
data: '<p>This is a really very extremely loooooong text that is going to be limited to two lines and have ellipsis at the end of the second line. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>'
style: {
'p': Style(maxLines: 2, textOverflow: TextOverflow.ellipsis)
}
) |
any news about the readmore feature with html widget |
if i pass maxLines parameter in defaultTextStyle , It is being applied into paragraph tags in html elements not for the whole data we pass. Is there any workaround for this?
The text was updated successfully, but these errors were encountered: