Common Flutter errors

Introduction

‘A RenderFlex overflowed…’

‘RenderBox was not laid out’

‘Vertical viewport was given unbounded height’

‘An InputDecorator…cannot have an unbounded width’

‘Incorrect use of ParentData widget’

‘setState called during build’

References

Introduction

This page explains several frequently-encountered Flutter framework errors and
gives suggestions on how to resolve them. This is a living document with more
errors to be added in future revisions, and your contributions are welcomed.
Feel free to open an issue or submit a pull request to make this page more
useful to you and the Flutter community.

‘A RenderFlex overflowed…’

RenderFlex overflow is one of the most frequently encountered Flutter framework
errors, and you probably have run into it already.

What does the error look like?