Flutter (Dart): Exceptions caused by rendering / A RenderFlex overflowed

This is a pretty common issue to run into, especially when you start testing your app on multiple devices and orientations. Flutter’s Widget gallery has a section covering the various scrolling widgets:

https://flutter.io/widgets/scrolling/

I’d recommend either wrapping your entire content in a SingleChildScrollView, or using a scrolling ListView.

EDIT: This question and answer have gotten some notice, so I’d like to provide a little more help for those who land here.

The Flutter SDK team puts a lot of effort into good documentation within the SDK code itself. One of the best resources for understanding the algorithm that Flex widgets (Row and Column are both subclasses of Flex) use to lay out their children is the DartDoc that accompanies the class itself:

https://github.com/flutter/flutter/blob/e3005e6962cfefbc12e7aac56576597177cc966f/packages/flutter/lib/src/widgets/basic.dart#L3724

The Flutter website also contains a tutorial on building layouts and an interactive codelab about how to use Row and Column widgets.

Leave a Comment