MarcinusX / buy_ticket_design

The UI Challenge in Flutter
https://marcinszalek.pl/flutter/tickets-challenge-parallax/
854 stars 216 forks source link

Overflowing Reserve widget #3

Open phanirithvij opened 5 years ago

phanirithvij commented 5 years ago

Just wanted to let you know that this overflows on my device like this

Screenshot_2019_06_02_17_22_24_522_com

The Error Log is this:

Restarted application in 2,949ms.

I/flutter (26129): ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════

I/flutter (26129): The following message was thrown during layout:

I/flutter (26129): A RenderFlex overflowed by 9.0 pixels on the bottom.

I/flutter (26129):

I/flutter (26129): The overflowing RenderFlex has an orientation of Axis.vertical.

I/flutter (26129): The edge of the RenderFlex that is overflowing has been marked in the rendering with a yellow and

I/flutter (26129): black striped pattern. This is usually caused by the contents being too big for the RenderFlex.

I/flutter (26129): Consider applying a flex factor (e.g. using an Expanded widget) to force the children of the

I/flutter (26129): RenderFlex to fit within the available space instead of being sized to their natural size.

I/flutter (26129): This is considered an error condition because it indicates that there is content that cannot be

I/flutter (26129): seen. If the content is legitimately bigger than the available space, consider clipping it with a

I/flutter (26129): ClipRect widget before putting it in the flex, or using a scrollable container rather than a Flex,

I/flutter (26129): like a ListView.

I/flutter (26129): The specific RenderFlex in question is:

I/flutter (26129):   RenderFlex#83f11 relayoutBoundary=up2 OVERFLOWING

I/flutter (26129):   creator: Column ← Padding ← CardContent ← Expanded ← Column ← Semantics ← DefaultTextStyle ←

I/flutter (26129):   AnimatedDefaultTextStyle ← _InkFeatures-[GlobalKey#45100 ink renderer] ←

I/flutter (26129):   NotificationListener<LayoutChangedNotification> ← CustomPaint ← _ShapeBorderPaint ← ⋯

I/flutter (26129):   parentData: offset=Offset(8.0, 8.0) (can use size)

I/flutter (26129):   constraints: BoxConstraints(0.0<=w<=256.0, h=112.0)

I/flutter (26129):   size: Size(256.0, 112.0)

I/flutter (26129):   direction: vertical

I/flutter (26129):   mainAxisAlignment: start

I/flutter (26129):   mainAxisSize: max

I/flutter (26129):   crossAxisAlignment: start

I/flutter (26129):   textDirection: ltr

I/flutter (26129):   verticalDirection: down

I/flutter (26129): ◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤

I/flutter (26129): ════════════════════════════════════════════════════════════════════════════════════════════════════

I/flutter (26129): Another exception was thrown: A RenderFlex overflowed by 9.0 pixels on the bottom.

I/flutter (26129): ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════

I/flutter (26129): The following message was thrown during layout:

I/flutter (26129): A RenderFlex overflowed by 9.0 pixels on the bottom.

I/flutter (26129):

I/flutter (26129): The overflowing RenderFlex has an orientation of Axis.vertical.

I/flutter (26129): The edge of the RenderFlex that is overflowing has been marked in the rendering with a yellow and

I/flutter (26129): black striped pattern. This is usually caused by the contents being too big for the RenderFlex.

I/flutter (26129): Consider applying a flex factor (e.g. using an Expanded widget) to force the children of the

I/flutter (26129): RenderFlex to fit within the available space instead of being sized to their natural size.

I/flutter (26129): This is considered an error condition because it indicates that there is content that cannot be

I/flutter (26129): seen. If the content is legitimately bigger than the available space, consider clipping it with a

I/flutter (26129): ClipRect widget before putting it in the flex, or using a scrollable container rather than a Flex,

I/flutter (26129): like a ListView.

I/flutter (26129): The specific RenderFlex in question is:

I/flutter (26129):   RenderFlex#83f11 relayoutBoundary=up2 OVERFLOWING

I/flutter (26129):   creator: Column ← Padding ← CardContent ← Expanded ← Column ← Semantics ← DefaultTextStyle ←

I/flutter (26129):   AnimatedDefaultTextStyle ← _InkFeatures-[GlobalKey#45100 ink renderer] ←

I/flutter (26129):   NotificationListener<LayoutChangedNotification> ← CustomPaint ← _ShapeBorderPaint ← ⋯

I/flutter (26129):   parentData: offset=Offset(8.0, 8.0) (can use size)

I/flutter (26129):   constraints: BoxConstraints(0.0<=w<=256.0, h=112.0)

I/flutter (26129):   size: Size(256.0, 112.0)

I/flutter (26129):   direction: vertical

I/flutter (26129):   mainAxisAlignment: start

I/flutter (26129):   mainAxisSize: max

I/flutter (26129):   crossAxisAlignment: start

I/flutter (26129):   textDirection: ltr

I/flutter (26129):   verticalDirection: down

I/flutter (26129): ◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤

I/flutter (26129): ════════════════════════════════════════════════════════════════════════════════════════════════════

I/flutter (26129): Another exception was thrown: A RenderFlex overflowed by 9.0 pixels on the bottom.
xiaoxiaosaohuo commented 5 years ago

this because ExpandedEventItem widget's layout height and width is overflow,you can give the left and height with fixed value.

Positioned(
      top: topMargin,
      left: 1,
      right: 0,
      height: 120,
......