Closed SooChang-Lee closed 2 months ago
Additionally in onWeightChange() _multiSplitViewController.getArea(0).size always returns null. However, _multiSplitViewController.getArea(0).weight returns a normal value.(ex 0.206846468)
Hi @SooChang-Lee!
You shouldn't use the controller's addListener
to get notified on changing dividers. This listener only notifies you of areas being added or removed.
So you should use onWeightChange
ok? As the name of the event says, it informs the weight change. The size
parameter is only used to define the initial size given the size of the container component. The MultiSplitViewController
keeps the data always in weight. If it were in size (pixels), we would have problems resizing the window or even adding a new area ok?
Perhaps the size
parameter should be renamed to initialSize
.
Thanks for the reply.
I want to be notified in real time when the size of the panel changes. When the size of the panel changes, it is used to adjust the size of other widgets.
Is there any way to be notified in real time whenever the size of the panel changes?
Will be resolved by #54
Done (version 3.0.0)
MultiSplitView multiSplitView = MultiSplitView(initialAreas: [
Area(widget: Draft.blue()),
Area(widget: Draft.yellow()),
Area(widget: Draft.green())
], onDividerDragUpdate: (index) => print('divider index: $index'));
Done (version 3.0.0)
MultiSplitView multiSplitView = MultiSplitView(initialAreas: [ Area(widget: Draft.blue()), Area(widget: Draft.yellow()), Area(widget: Draft.green()) ], onDividerDragUpdate: (index) => print('divider index: $index'));
Just updated to version 3.0.0 because of the onDividerDragUpdate
. However, there are breaking changes:
No more Area.weight
parameter? What is it's equivalent in this new version?. Also No MultiSplitView.children property, one would have to use initialAreas instead. This changes needs to be documented
Hi @Uche01
https://pub.dev/packages/multi_split_view
Every package on pub.dev has the CHANGELOG session. See the example demo link.
Thanks for the nice plugin.
I want to receive an event when the Divider is dragging.
I added a listener using MultiSplitViewController.addListener(), but no event occurs when the Divider is dragging.