Closed davoutuk closed 1 year ago
Hey @davoutuk , thank you for using the package!
I'm planning on adding this feature in the future.
In the meantime, you can achieve this behavior by subclassing TreeController
and overriding the setExpansionState()
and getExpansionState()
methods with the appropriate implementation.
Thanks for the prompt reply...
A couple of suggestions on the idea of adding new features for expanding the tree....
a). new 'fullyExpandedAtStart' and 'fullyExpandedOnRefresh' properties at 'TreeView' level. Add two new boolean properties that can be used to define if a tree should be fully expanded when first displayed, and when a refresh is required.
b). add new 'nodeExpanded' callback method at 'TreeView' level.
`bool Function(TreeEntry<T> entry);`
This method would be called for each tree entry allowing the developer to return a 'true' or 'false' if the node is be displayed is to be displayed as expanded. The method would be called prior to calling 'nodeBuilder'. This would allow the developer to programmatically control which nodes are to start as expanded
I have a Flutter app where I am using the 'flutter_tree_view' widget.
A couple of questions: