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

[Help] DataTable inside tree, when node !hasChildren #58

Closed
vivagelive opened this issue Jul 13, 2023 · 2 comments
Closed

[Help] DataTable inside tree, when node !hasChildren #58

vivagelive opened this issue Jul 13, 2023 · 2 comments
Labels
question Further information is requested

Comments

@vivagelive
Copy link

Hi! Is it possible to insert a datatable into a node if there are no children? Have you any advise or solution? Thanks for your reply.

@baumths baumths added the question Further information is requested label Jul 17, 2023
@baumths
Copy link
Owner

baumths commented Jul 17, 2023

Hey, sorry for the delay, I've been busy lately.

I'm not sure I understand the question. Could you elaborate or add an example of the desired behavior?

Having conditional widgets should be straightforward:

TreeView(
  ...,
  nodeBuilder: (BuildContext context, TreeEntry entry) {
    if (entry.node.isLeaf) {
      return DataTable(...);
    }
    return MyNodeWidget(...);
  }
)

@vivagelive
Copy link
Author

Hi, sorry for late answer. I tried many options and was able to do what I wanted. Thanks for your answer. Awesome package, Thx

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

No branches or pull requests

2 participants