I have a container with a stack as child but when the text has too many lines it gets cut off. I would like the container to adapt to the text.
this is how it looks so far
Related
I need to cutout both images (icons that have transparency) and text into a Container.
The main method to achieve this appears to be using ShaderMask.
My main issue is that this doesn't allow me to wrap my text or image in a simple Container, with fixed height and decoration.
How can I either have this mask/cutout apply to a parent widget or gain further customisation options on the child? Or is there a more flexible option than ShaderMask?
I tried to follow this link to create a scrollable UI: https://www.youtube.com/watch?v=ArH0S2Cdptk&t=21s&ab_channel=AlexanderZotov
If I use Text, it is working as expected. But if I use TextMeshPro, it won't scroll until bottom.
When Loaded it look like this
When I scroll down normally, it only reaches up to this point.
If I try to force the scroll, it would reach here but if I release my scroll, it will return to the 2nd image.
Here's my objects:
My text container is connected to TMP rect.
Why is it that it won't go to the bottom normally when I scroll?
Note: The height of the TMP has the whole text included without any truncation.
I don't know why, if I just use the exact height of my text, it won't work. But if I just doubled the height, it is working as my expectation.
Does anybody have a clue how to achieve expand/collapse animation for a given Container widget?
I tried to use ExpandablePanel but it is not what I really want, because I want to render a Column within a Container, and if the Container is collapsed I want to show only 150px from it, otherwise it should have the height of the content.
Clicking on the arrow the Container should toggle it's state.
Below are some images which represents the goal:
Collapsed
Expanded
The overflow error is thrown because when the column is collapsed there is no room to contain all the children inside the column.
What do we do when we have a column with children's height larger than the screen height? We use scrolling!
So you can wrap your column with SingleChildScrollView widget to make the column scrollable, so when it collapses it doesn't complain about the children's height, instead, the scrolling functionality handles them because you can scroll in a column even if it has very small width.
I currently have a ListView.builder of containers that expand once I tap it. However, I'd like the containers to center in on the expanded container that was tapped.
List of items mockup
Expanded Container mockup
Currently, if I tap on No.2 from the Expanded Container mockup picture, the container will expand but it won't snap/focus on that container. I'd like to find a way to make this possible.
Thank you in advance!
I have a not scrollable Form with a BorderLayout. In the CENTER of this BorderLayout, I have made a scrollable Container with BoxLayoutY. Inside this Container are appearing more Container. When there are a lot of Containers the CENTER Container is scrollable, but the last element is nos visible, I have to go down with the focus to see the last Container. What I want to do is:
When a new Container appears in the CENTER Container , this Container must scroll down, revealing the last Container added...is like an auto-scrolling.
Any help?
What about :
componentOfLastContainer.requestFocus();
centerBigContainer.repaint();