fileTree static method
Creates a file tree with directory styling.
Implementation
static Tree fileTree(Map<String, dynamic> structure, {String? root}) {
return fromMap(structure, root: root)
..enumerator(TreeEnumerator.normal)
..itemStyleFunc((children, index) {
final node = children[index];
if (node.childrenNodes.isNotEmpty) {
return Style().bold().foreground(Colors.info);
}
return Style().foreground(Colors.white);
});
}