Linked Questions

Popular Questions

I have list tiles that contain data that varies a lot. Inside each of them I want to fit category labels (maybe using Chip widgets) but the issue is, I need to limit the number of them to fit a specific width constrains. The number of categories inside my list of data also varies - sometimes one of the tiles will have 2 categories, sometimes 5 and sometimes 0. How do I fit them on a screen, so they can "sit" in one row only? To be more specific, I want to display only as much category labels as it fits the width of my list tile - the rest won't be shown.

Is there some simple solution that does not require measuring each label width and comparing it to the screen size of a device?

Wrap widget won't work for my problem as it cannot be limited to one row only and there is no option to limit number of its child widgets as well depending on a size constrains

Layout of my tiles

Related Questions