buildScopeHierarchy static method

  1. @visibleForTesting
List<Map<String, dynamic>> buildScopeHierarchy()

Build hierarchical scope tree starting from root scopes (including standalone ZenProvider root scopes).

Implementation

@visibleForTesting
static List<Map<String, dynamic>> buildScopeHierarchy() {
  final allScopes = ZenDebug.allScopes;
  final rootScopes = allScopes.where((s) => s.parent == null).toList();
  return rootScopes.map(scopeToMap).toList();
}