sooxie / list_treeview

A treeview for Flutter. Based on the listview.
MIT License
64 stars 23 forks source link

Expose notifyListeners in TreeViewController #3

Closed archie-sh closed 3 years ago

archie-sh commented 4 years ago

Hi,

thanks for writing the plugin, it works quite well.

We came across the situation in which we need to udpate NodeData we have extended while using the same TreeViewController to keep nodes expanded / collapsed after the update.

I considered writing methods to update the node and implemented them in this fork https://github.com/archie-sh/list_treeview but its nicer to apply the logic on the custom objects on our app side and just notifying the tree that there has been a change.

I would suggest expsoing notifiyListeneres in a rebuild method. e.g.

void rebuild() { notifyListeners(); }

Regards.

sooxie commented 3 years ago

I am very sorry that I have been too busy to reply to you recently. I think your idea is good. Thank you