buildTree method

Future<List<TreeNode<VEntity>>> buildTree(
  1. BuildContext context
)

Implementation

Future<List<TreeNode<VEntity>>> buildTree(BuildContext context) async {
  List<TreeNode<VEntity>> nodes = [];
  VFS vfs = context.vfs;
  VFolder root = vfs.root;
  VFolder wd = (await vfs.getEntity(vfs.workingDirectory)) as VFolder;

  nodes.add(TreeRoot<VEntity>(children: [
    ...(await root.treeNode(context, addChildren: true)).children,
  ]));

  print("Nodes: ${nodes.length}");
  return nodes;
}