getWidgetDiagnostics method Null safety
- 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:
- getRenderObjectDiagnostics, which gets the DiagnosticsNode of a RenderObject.
Implementation
Future<Map<String, Object?>> getWidgetDiagnostics(
SerializableFinder finder, {
int subtreeDepth = 0,
bool includeProperties = true,
Duration? timeout,
}) async {
return sendCommand(GetDiagnosticsTree(
finder,
DiagnosticsType.widget,
subtreeDepth: subtreeDepth,
includeProperties: includeProperties,
timeout: timeout,
));
}