debugPrintHierarchy method

void debugPrintHierarchy({
  1. int depth = 0,
})

Prints the hierarchy of this node and all its children to the console.

Implementation

void debugPrintHierarchy({int depth = 0}) {
  String indent = '  ' * depth;
  debugPrint('$indent$name');
  for (var child in children) {
    child.debugPrintHierarchy(depth: depth + 1);
  }
}