Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/crdzbird/array_to_tree_flutter
Convert any plain array into a n-level tree
https://github.com/crdzbird/array_to_tree_flutter
Last synced: 26 days ago
JSON representation
Convert any plain array into a n-level tree
- Host: GitHub
- URL: https://github.com/crdzbird/array_to_tree_flutter
- Owner: Crdzbird
- License: mit
- Created: 2021-02-11T22:45:15.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-02-12T13:56:18.000Z (almost 4 years ago)
- Last Synced: 2024-04-17T01:05:42.994Z (9 months ago)
- Language: Dart
- Size: 59.6 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# 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**
```yaml
dependencies:
array_to_tree: ^0.1.0
```To generate the hierarchy list, just call this.
```dart
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);
```DONE:
- [x] Conversion of Plain Array into a List with n-level construction.### Special Thanks
- To the creator of [ARRAY_TO_TREE](https://github.com/alferov/array-to-tree)
## Maintainers
- [Luis Bird](https://github.com/Crdzbird)
- [Danilo Meneses](https://github.com/danilomx)### Contributing
All contributions are welcome!
If you like this project then please click on the :star2: it'll be appreciated or if you wanna add more epic stuff you can submit your pull request and it'll be gladly accepted :ok_man: