Flexible (Flutter Widget of the Week)

How to debug layout issues with the Flutter Inspector

Understanding constraints

‘RenderBox was not laid out’

While this error is pretty common, it’s often a side effect of a primary error 
occurring earlier in the rendering pipeline.

What does the error look like?

The message shown by the error looks like this:

How might you run into this error?

Usually, the issue is related to violation of box constraints, and it needs to
be solved by providing more information to Flutter about how you’d like to
constrain the widgets in question. You can learn more about how constraints work
in Flutter on the page Understanding constraints.

The RenderBox was not laid out error is often caused by one of two other errors:

‘Vertical viewport was given unbounded height’

‘An InputDecorator…cannot have an unbounded width’