Skip to content

🐛 PaneItem overflows when transitioning from compact to open #906

@harlanx

Description

@harlanx

Similar issue to #588 has resurfaced on the latest update.

To Reproduce
Steps to reproduce the behavior:

  1. Use fluent package example app
  2. Provide a widget for infoBadge parameter on a PaneItem
  3. Set displayMode of NavigationPane to PaneDisplayMode.auto
  4. flutter run --debug -d windows
  5. Resize window width by mouse
  6. See error

Additional context

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

The relevant error-causing widget was:
  Row
  Row:file:///D:/Documents/Projects/Dart/fluent_ui/lib/src/controls/navigation/navigation_view/pane_items.dart:244:24

To inspect this widget in Flutter DevTools, visit:
http://127.0.0.1:9102/#/inspector?uri=http%3A%2F%2F127.0.0.1%3A58791%2FO1HH0isi4Lw%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#cac0b relayoutBoundary=up39 OVERFLOWING:
  creator: Row ← ConstrainedBox-[GlobalKey#dbc72 NavigationPaneItem key; PaneItem] ← Stack ←
    FocusBorder ← Padding ← DecoratedBox ← Padding ← Container ← Semantics ← Listener ←
    _GestureSemantics ← RawGestureDetector ← ⋯
  parentData: <none> (can use size)
  constraints: BoxConstraints(0.0<=w<=38.0, 40.0<=h<=Infinity)
  size: Size(38.0, 40.0)
  direction: horizontal
  mainAxisAlignment: start
  mainAxisSize: max
  crossAxisAlignment: center
  textDirection: ltr
  verticalDirection: down
◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤
════════════════════════════════════════════════════════════════════════════════════════════════════

Metadata

Metadata

Labels

bugSomething isn't workingw: NavigationViewRelated to the NavigationView widget

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions