Consider allowing Node to store model data

Issue #3 resolved
Vasanth Velusamy created an issue

If Node can also store model data, then subsequently, it gets easier to access the model when an action is performed on the node (such as tap, double tap).

For example:

Node node = Node(
  label: ...
  key: ...
  ...
  data: <custom data model object>
)

...
onNodeDoubleTap: (String key) {
   Node selectedNode = _treeViewController.getNode(key);
   MyModel selectedModel = selectedNode.data;
}

Nice widget, by the way. 🙂

Comments (3)

  1. Kevin Armstrong

    Thanks Vansanth. I like that idea. That should be easy enough to implement. Give me a day or so to implement it and test it out.

  2. Log in to comment