baumths / flutter_tree_view

A Flutter collection of widgets and slivers that helps bringing your hierarchical data to life.
https://baumths.github.io/flutter_tree_view
MIT License
175 stars 62 forks source link

Is it possible to have no interaction ? #52

Closed vptcnt closed 1 year ago

vptcnt commented 1 year ago

Hello

Is it possible to display a full expanded tree view, but to not have any interaction with it ? Just display hierarchical data, just scrollable, but with no click on the nodes.

baumths commented 1 year ago

Hey @vptcnt!

That's totally doable. Those interactions are added at the node widget level, you have to provide null to any "on" callback your widgets might have, like onPressed and onTap.

If that is not enough and you want to make sure your tree nodes are not tappable, you could wrap them with the IgnorePointer widget.

Keep in mind that the IgnorePointer widget will also remove hover effects and alikes.