Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flutter simple tree: lazy build subtree nodes #531

Open
javaone199 opened this issue Apr 29, 2024 · 0 comments
Open

flutter simple tree: lazy build subtree nodes #531

javaone199 opened this issue Apr 29, 2024 · 0 comments

Comments

@javaone199
Copy link

javaone199 commented Apr 29, 2024

Problem description

This is a feature request for flutter-simple-treeview.

TreeView( treeController: TreeController(allNodesExpanded: false), nodes: [...])

It requires all the widgets for the whole tree nodes need to be built in advance. For a node that has descendants, building descendant nodes should be delayed until the node is expanded. For a big tree with complex nodes, experience seconds of delays.

Expected behavior

When a node is expanded and its children widgets have not been created, call a builder to build its children.

TreeView( treeController: TreeController(allNodesExpanded: false), nodes: [...], childrenBuilder: (TreeNode parent) { // return a list of TreeNodes. })

TreeNode should have a value (Object) that can be used to reference the data for building the TreeNode so that in the builder method the children of the data can be obtained.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant