sooxie / list_treeview

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

Is it possible to insert root item? #10

Open anthonychwong opened 2 years ago

anthonychwong commented 2 years ago

The read me mentions these method in controller to insert nodes but they all seems need a parent. Is it possible to insert items at root level?

_controller.insertAtFront(dataNode, newNode);
//_controller.insertAtRear(dataNode, newNode);
//_controller.insertAtIndex(1, dataNode, newNode);
gmckesey commented 1 year ago

I have the very same question. @anthonychwong did you manage to figure out how to add a root node?

BOBMAXIMUS commented 12 months ago

Hi, im facing the same issue, got an idea of a solution? @anthonychwong @gmckesey

lixp185 commented 12 months ago

这是一封自动回复邮件。已经收到您的来信,我会尽快回复。

ainjayla commented 3 weeks ago

I made some changes and created fork https://github.com/digipurk/list_treeview To add new root node use: TreeViewController.insertRoot(NodeData newRoot)