descendants property

List<RenderObjectData> get descendants

The data of the RenderObject's descendants.

Implementation

List<RenderObjectData> get descendants {
  final workingSet = [this];
  final result = <RenderObjectData>[];

  while (workingSet.isNotEmpty) {
    final renderObject = workingSet.removeLast();
    result.add(renderObject);
    workingSet.addAll(renderObject.children);
  }

  return result;
}