getWidgetDiagnostics method

Future<Map<String, Object>> getWidgetDiagnostics (SerializableFinder finder, { int subtreeDepth: 0, bool includeProperties: true, Duration timeout })

Returns a JSON map of the DiagnosticsNode that is associated with the Widget identified by finder.

The subtreeDepth argument controls how many layers of children will be included in the result. It defaults to zero, which means that no children of the Widget identified by finder will be part of the result.

The includeProperties argument controls whether properties of the DiagnosticsNodes will be included in the result. It defaults to true.

Widgets describe configuration for the rendering tree. Individual widgets may create multiple RenderObjects to actually layout and paint the desired configuration.

See also:

Implementation

Future<Map<String, Object>> getWidgetDiagnostics(
  SerializableFinder finder, {
  int subtreeDepth = 0,
  bool includeProperties = true,
  Duration timeout,
}) async {
  return _sendCommand(GetDiagnosticsTree(
    finder,
    DiagnosticsType.renderObject,
    subtreeDepth: subtreeDepth,
    includeProperties: includeProperties,
    timeout: timeout,
  ));
}