resizable_columns 0.1.0
resizable_columns: ^0.1.0 copied to clipboard
A Flutter widget that lays out panes in a row or a column with draggable dividers. Supports nesting, minimum sizes, pushing neighbouring panes and right-to-left layouts.
0.1.0 #
Added #
onSizesChangedreports the size of every pane while a divider is dragged, so a layout can be saved and restored throughinitialSizes.dragModewithResizableDragMode.push: a divider goes past a pane that is at its minimum size and shrinks the panes further along. Dragging back within the same gesture gives them their space again. The default,ResizableDragMode.adjacent, is the previous behavior.dividerHitSize: a divider can be dragged by a 12 px area centered on it. The area lies over the edges of the panes and does not change the layout, and a tap inside it still reaches the pane. Before, only the divider itself could be dragged, which also means a divider with a thickness of 0 can now be dragged.- Doc comments for the whole public API.
- Tests.
- The example runs on the web out of the box and shows fixed, scrolling, nested and oversized content.
Changed #
- Breaking in debug builds:
initialSizesmust have one entry per child and cannot be combined withinitialProportions. Both are asserts; in release aninitialSizeslist of the wrong length gives an equal split. - Panes keep their proportions when the parent is resized, including after it shrinks and grows back.
- Panes are no longer rebuilt while a divider is dragged or when the parent is resized. The builders run when the widget itself is rebuilt or when something a pane depends on changes.
- Changing the number of children resets the sizes to the initial ones.
alignmentsets the cross-axis alignment in both orientations.- A single child is allowed and fills the space.
- With
draggable: falsethe dividers no longer change the mouse cursor. - Requires Flutter 3.24 or later.
- The README is rewritten for the current API.
Fixed #
minChildSizewas broken when the parent shrank.- Adding a child crashed, and removing one left a gap.
- The divider moved against the pointer in right-to-left layouts.
- The divider drifted away from the pointer after it passed the minimum size of a pane.
initialProportionsthat add up to zero crashed the layout.- An unbounded parent crashed the layout.
initialSizesare used there as they are, and an assert asks for them when they are missing.
0.0.2 #
- Added
dividerColorto change the color of the divider.
0.0.1 #
- Initial release.