Flutter – Row Multiline with Containers

Issue

I have a Row with some Containers in it, this causes an overflowed on the right.
How can I make that once a container has overflowed, the next ones go in a new line

I hope I was clear and that someone can answer me.
Thank you 🙂

Solution

Instead of using a Row() widget you need to use a Wrap() widget and make sure to have your Container()’s width not overflowed.
Wrap() widget just do according to what you need right now, it arranges its children in horizontal direction(by default – you can change it though) and if any child overflowed then move that child in new line.

Answered By – Ankit Kumar Maurya

Answer Checked By – David Goodson (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *