dvStudioStructureOf function

List<Map<String, Object?>> dvStudioStructureOf(
  1. BuildContext context
)

The structure of the page rendered under context, in the shape the build's semantics capture writes: the words, headings, links, images and buttons, and the rows and columns they sit in.

Read off the element tree rather than the semantics tree, so it works in a release build and on every platform Studio runs on.

Implementation

List<Map<String, Object?>> dvStudioStructureOf(BuildContext context) {
  final List<Map<String, Object?>> out = <Map<String, Object?>>[];
  (context as Element).visitChildElements((Element child) {
    out.addAll(_structureOf(child));
  });
  return out;
}