Mantano / iridium

Unofficial Dart/Flutter port of some of the Readium 2 components
80 stars 28 forks source link

Reader widget settings: A RenderFlex overflowed by 6.2 pixels on the right #28

Open voipworld opened 2 years ago

voipworld commented 2 years ago

Hello, while trying the reader widget, i discovered the following warning, i thought i create a issue for it so it can be fixed later: this is the full debug message. ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════ The following assertion was thrown during layout: A RenderFlex overflowed by 6.2 pixels on the right.

The relevant error-causing widget was: ToggleButtons ToggleButtons:file:///D:/projects/flutter/iridium_reader_widget/lib/views/viewers/ui/settings/general_settings_panel.d art:97:35

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

The overflowing RenderFlex has an orientation of Axis.horizontal. 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#24fbb relayoutBoundary=up3 OVERFLOWING: needs compositing creator: Row ← IntrinsicHeight ← _InputPadding ← ToggleButtons ← Column ← Padding ← GeneralSettingsPanel ← KeyedSubtree-[<0>] ← RepaintBoundary ← IndexedSemantics ← NotificationListener ← KeepAlive ← ⋯ parentData: (can use size) constraints: BoxConstraints(0.0<=w<=189.8, h=50.0) size: Size(189.8, 50.0) direction: horizontal mainAxisAlignment: start mainAxisSize: min crossAxisAlignment: stretch textDirection: ltr verticalDirection: down i recomand using Checkboxs for the toggles, buttons itself is not good for users with disability using screen readers.

jmgeffroy commented 2 years ago

Thanks a lot!