Container width based on text width

Widgets & Design

Hi guys,

I have a Listview containing two containers, each container containing a text element that dynamically loads text into it from my DB - a simple chat UI.

Now I want to container width only as high as the width of the text but with a max width so it doesnt overflow into the screen border. I tried multiple things, for example adding Max W to the container, but it seems Max W works similar as Width here. If I set a Max W, it just gives the container the Max W as normal width.

Example in the screenshot, I set Max W of both containers to 200.

Isnt this the purpose of "max" Width?

What have you tried so far?

Wrap container in a stack, trying to use a code expression (couldnt manage to make it work), trying every layout option I could find, asking in other forums

Did you check FlutterFlow's Documentation for this topic?
Yes
1 reply