buildHierarchyTree static method

Map<String, dynamic> buildHierarchyTree([
  1. ZenScope? startScope
])

Build a complete hierarchy tree starting from root

Implementation

static Map<String, dynamic> buildHierarchyTree([ZenScope? startScope]) {
  final scope = startScope ?? Zen.rootScope;

  return {
    'scope': ZenScopeInspector.toDebugMap(scope),
    'children':
        scope.childScopes.map((child) => buildHierarchyTree(child)).toList(),
  };
}