scrapeRenderTree method

  1. @override
ElementData? scrapeRenderTree(
  1. BuildContext context,
  2. Map<Type, bool> sensitiveWidgetsTypes
)
override

gets data from all visible objects inside a tree

Implementation

@override
ElementData? scrapeRenderTree(
  BuildContext context,
  Map<Type, bool> sensitiveWidgetsTypes,
) {
  final firstElement = getRootElement(context);
  if (firstElement == null) {
    return null;
  }

  final firstElementData = getFirstElementDataFromElement(firstElement, "Root object");
  if (firstElementData == null) {
    return null;
  }

  rootElementData = firstElementData;

  scrapeAllElements(
    rootElementData,
    firstElement,
    false,
    sensitiveWidgetsTypes,
  );

  return rootElementData;
}