Fix RenderFlex Error
In this step, we're going to
- Fix render flex error
Check Error log
terminal
โโโโโโโโ Exception caught by rendering library โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
The following assertion was thrown during layout:
A RenderFlex overflowed by 91 pixels on the bottom.
The relevant error-causing widget was
Column
lib\pages\register_page.dart:43
The overflowing RenderFlex has an orientation of Axis.vertical.
The edge of the RenderFlex that is overflowing has been marked in the rendering with a yellow and black striped pattern. This is usually caused by the contents being too big for the RenderFlex.
Consider applying a flex factor (e.g. using an Expanded widget) to force the children of the RenderFlex to fit within the available space instead of being sized to their natural size.
This is considered an error condition because it indicates that there is content that cannot be seen. If the content is legitimately bigger than the available space, consider clipping it with a ClipRect widget before putting it in the flex, or using a scrollable container rather than a Flex, like a ListView.
How to fix
According to this stackoverflow question
You can fix this error by wrapping form widget with SingleChildScrollView
register_page.dart
body: SingleChildScrollView(
child: Form(
...