animated_tree_view icon indicating copy to clipboard operation
animated_tree_view copied to clipboard

Dynamic change of root

Open garth-waters opened this issue 1 year ago • 2 comments

Hi,

Thanks very much for this package. I seem to have an issue when I change the root node and rebuild the treeview widget. The treeview builds the same but when the build method is called it seems to remember the old root nodes. The build method is called with nodes that no longer exist in the new root node. As an example if I create a root node with 3 nodes the build method is correctly called 3 times. Then if I change the root node to just 1 node and rebuild then the builder is called 4 times. This is the root node output - IndexedNode{children: [IndexedNode{children: [], key: 1, parent: IndexedNode{children: [...], key: /, parent: null}}], key: /, parent: null}

I am using the GetIt mixin with a stateless widget to create the TreeView.

Many Thanks Garth

garth-waters avatar Aug 31 '23 13:08 garth-waters