getRenderObjectDiagnostics 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
RenderObject 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 RenderObject 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.
RenderObjects are responsible for positioning, layout, and painting on the screen, based on the configuration from a Widget. Callers that need information about size or position should use this method.
A widget may indirectly create multiple RenderObjects, which each implement some aspect of the widget configuration. A 1:1 relationship should not be assumed.
See also:
- getWidgetDiagnostics, which gets the DiagnosticsNode of a Widget.
Implementation
Future<Map<String, Object?>> getRenderObjectDiagnostics(
SerializableFinder finder, {
int subtreeDepth = 0,
bool includeProperties = true,
Duration? timeout,
}) async {
return sendCommand(GetDiagnosticsTree(
finder,
DiagnosticsType.renderObject,
subtreeDepth: subtreeDepth,
includeProperties: includeProperties,
timeout: timeout,
));
}