Closed samuel-s-marques closed 1 year ago
Hi @samuel-s-marques, yea, it's possible. We are doing that in our app -- multi-line on start, one line with an ellipsis when shrunken. I will tell you how ASAP when I am on my computer.
I should probably add some storybooks to show examples like this.
@tenhobi, thank you. I appreciate your prompt response and willingness to assist.
@samuel-s-marques fixed the default story so the text is wrapped correctly. Previously I used Matrix4
which "moves" already rendered widget and so the text didn't wrap correctly as seen on your screenshot.
For the second story "Multiline to one line" I implemented an example of how to handle the case when you start to shrink the app bar to switch to one line. You can modify the threshold and play with it. 👍
The example uses TextPainter, so I can work with text height etc. If somebody has a better idea, please fill out a PR. :)
I just tested and it looks great! Thank you!
I'm currently using this package in my app and I'm wondering if there's a way to overflow a text widget inside the contentBuilder. Here are the screenshots of storybook demo using iPhone 12 Mini layout, for example:
A long appbar text title:
The Text widget when shrunken:
It would be great to add an ellipsis at the end.