gjwgit / rattleng

The New Generation R Analytics Desktop App
GNU General Public License v3.0
18 stars 8 forks source link

Column: overflow #155

Open yixiangyin opened 3 months ago

yixiangyin commented 3 months ago

This overflow appear to be a pattern over all panels.

══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════ The following assertion was thrown during layout: A RenderFlex overflowed by 2.0 pixels on the bottom.

The relevant error-causing widget was: Column Column:file:///Users/yinyixiang/repo/my_rattleng/lib/panels/cluster/panel.dart:46:13

To inspect this widget in Flutter DevTools, visit: http://127.0.0.1:9102/#/inspector?uri=http%3A%2F%2F127.0.0.1%3A62453%2FRRz36iVVGN8%3D%2F&inspectorRef=inspector-0

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#09aae relayoutBoundary=up1 OVERFLOWING: needs compositing creator: Column ← KeyedSubtree-[GlobalKey#5660d] ← _BodyBuilder ← MediaQuery ← LayoutId-[<_ScaffoldSlot.body>] ← CustomMultiChildLayout ← _ActionsScope ← Actions ← AnimatedBuilder ← DefaultTextStyle ← AnimatedDefaultTextStyle ← _InkFeatures-[GlobalKey#3bc8a ink renderer] ← ⋯ parentData: offset=Offset(0.0, 0.0); id=_ScaffoldSlot.body (can use size) constraints: BoxConstraints(0.0<=w<=1256.0, 0.0<=h<=642.0) size: Size(1256.0, 642.0) direction: vertical mainAxisAlignment: start mainAxisSize: max crossAxisAlignment: center verticalDirection: down

Image

yixiangyin commented 3 months ago

This seem to be why: as we make the height shorter, the current window height is not passed so we have the old window height. use a layoutbuilder https://www.youtube.com/watch?v=HD5gYnspYzk&list=TLPQMTkwNjIwMjTMjHtbnopaIQ&index=2 3:30

update: if we provide a height limit at a highest possible level with the expanded, the children will get the height so that we don't need to use this.