forEach method

void forEach(
  1. void iteratee(
    1. Map<String, dynamic> node,
    2. int index
    )
)

Implementation

void forEach(void Function(Map<String, dynamic> node, int index) iteratee) {
  if (properties.isEmpty) return;
  int index = 0;

  void run(Map<String, dynamic> node) {
    iteratee(node, index++);
    final children = node['children'];
    if (children is List) {
      for (var c in children) {
        run(c);
      }
    }
  }

  run(properties);
}