-
Notifications
You must be signed in to change notification settings - Fork 28.5k
TextOverflow.fade results in unexpected fade direction #13631
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
Comments
If softWrap is on, then the width constraint is given to the text renderer so it knows where to apply wrapping. The renderer then reports that the text filled the maximum width but would have wrapped to the next line. So the fade effect is then painted at the bottom of the text to signify that the text overflowed its height constraint. |
Perhaps then the problem is our understanding of the parameters for Text. When we don't want text to wrap (but instead clip) we use |
8000
If you don't want text to wrap (except at explicit line breaks), then setting |
Thanks! |
I'm going to re-open this bug to make sure the documentation explains this, including screenshots. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as resolved.
This comment was marked as resolved.
Seems like this wasn't properly re-opened :-) |
This PR fixes #13631 through documentation as suggested in #13631 (comment). Since the documentation additions rely on new screenshots this PR will be accompanied by a PR in the assets repository.
This PR fixes flutter#13631 through documentation as suggested in flutter#13631 (comment). Since the documentation additions rely on new screenshots this PR will be accompanied by a PR in the assets repository.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
results in:
I was expecting it to fade out horizontally. If I set overflow to ellipsis, it works as expected and puts the ellipsis at the end.
If I turn off softwrap, fade works as expected. That's counterintuitive given that I would have expected softwrap to have no effect because of maxLines: 1.
The text was updated successfully, but these errors were encountered: