dumpWidgetTree method

Children dumpWidgetTree(
  1. Element context,
  2. double screenHeight,
  3. double screenWidth
)

Implementation

Children dumpWidgetTree(Element context, double screenHeight, double screenWidth) {
  Entry rootEntity = Entry(element: context);

  Children jsonHierarchy = Children();

  List<List<String>> outputs = [];

  Attr screen = Attr(x: 0, y: 0, h: screenHeight.toInt(), w: screenWidth.toInt());

  rootEntity.toStringList(jsonObject: jsonHierarchy, list: outputs, tempIndex: 0, parent: screen);

  if(Logger.printHierarchy) {
    Logger.i('[Widget Tree]');

    int i = 0;
    for (var e in outputs) {
      Logger.i(e[0].padRight(i++));
    }
  }

  return jsonHierarchy;
}