treeNode method
Implementation
Future<TreeNode<VEntity>> treeNode(BuildContext context,
{bool addChildren = false}) async {
return TreeItem<VEntity>(
data: this,
children: this is VFolder && addChildren
? await Future.wait(await context.vfs
.getChildren(this as VFolder)
.asyncMap((e) =>
e.map((e) => e.treeNode(context, addChildren: addChildren)))
.toList())
: []);
}