blob: f69802eab62663e48ac878e98e4129070154ff4b [file] [log] [blame] [view]
# exposeDiagnosticsTree method
*[<Null safety>](https://dart.dev/null-safety)*
void exposeDiagnosticsTree
([Outgoing](../../package-fuchsia_services_services/Outgoing-class.md) outgoing, String name)
<p>Mounts an <a href="../../package-fuchsia_inspect_inspect/Inspect-class.md">Inspect</a> file at name.inspect to the hub that exposes the root
diagnostic hierarchy for this component.</p>
## Implementation
```dart
static void exposeDiagnosticsTree(Outgoing outgoing, String name) {
Inspect()
..serve(outgoing)
..onDemand(name, (Node inspectMountRoot) {
var diagnosticsRoot =
WidgetsBinding.instance.renderViewElement!.toDiagnosticsNode();
inspectFromDiagnostic(diagnosticsRoot, inspectMountRoot);
});
}
```