ir0nstone / Twooter

A simple implementation of an app like Twitter, created to teach myself how to use Firebase and how to integrate it with Flutter.
0 stars 0 forks source link

Bug with RenderFlex on Login #12

Open ir0nstone opened 2 years ago

ir0nstone commented 2 years ago

When you click the Log In button, there is a momentary RenderFlex bug when the navigation switches position.

The following assertion was thrown during layout:
A RenderFlex overflowed by 196 pixels on the bottom.

The relevant error-causing widget was: 
  Column Column:file:///C:/Users/Andrej/IdeaProjects/Twooter/lib/postauth/account_screen.dart:18:25
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.

The specific RenderFlex in question is: RenderFlex#d8ea1 relayoutBoundary=up4 OVERFLOWING
...  needs compositing
...  parentData: offset=Offset(0.0, 88.0); id=_ScaffoldSlot.body (can use size)
...  constraints: BoxConstraints(0.0<=w<=411.4, 0.0<=h<=492.0)
...  size: Size(411.4, 492.0)
...  direction: vertical
...  mainAxisAlignment: start
...  mainAxisSize: max
...  crossAxisAlignment: center
...  verticalDirection: down
ir0nstone commented 2 years ago

The yellow-and-black patttern generally appears between the Uid text and the Sign Out button, but cannot for the life of me work out why. Simply Hot Reloading the page also makes it work fine and not throw an error, so it only errors during the navigation switch.