Last updated:
0 purchases
array to tree
ARRAY_TO_TREE #
Create any Multi Level Tree on your flutter app based on a Plain Array.
To use this please add in your pubspec.yaml #
dependencies:
array_to_tree: ^0.1.0
copied to clipboard
To generate the hierarchy list, just call this.
var list = [
{'id': 1, 'title': 'home', 'parent': null},
{'id': 2, 'title': 'about', 'parent': null},
{'id': 3, 'title': 'team', 'parent': 2},
{'id': 4, 'title': 'company', 'parent': 2},
{'id': 5, 'title': 'company', 'parent': 3}
];
buildTree() => _hierarchyTree = ArrayToTree.buildStaticTree(list);
copied to clipboard
DONE:
✅ Conversion of Plain Array into a List with n-level construction.
Special Thanks #
To the creator of ARRAY_TO_TREE
Contributing #
All contributions are welcome!
If you like this project then please click on the 🌟 it'll be appreciated or if you wanna add more epic stuff you can submit your pull request and it'll be gladly accepted 🙆♂️
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.