Add Driver command to get diagnostics tree#34440
Conversation
|
/cc @adazh |
|
/cc @jacob314 |
There was a problem hiding this comment.
Should this be DiagnosticsType.element then? And the associated method called getElementDiagnostics?
There was a problem hiding this comment.
This is consistent with the terminology we use in the Widget Inspector for these two trees.
There was a problem hiding this comment.
Says that it defaults to zero, but it looks like it can be null above?
There was a problem hiding this comment.
That null handling as a left-over from something else I tried. I am going to remove it and add a non-null assert.
There was a problem hiding this comment.
NPE if subtreeDepth is null
There was a problem hiding this comment.
Calling toString on null is actually perfectly legal: https://dartpad.dartlang.org/be63aa1861c7e7c1dccfbd159121dba0 :)

Description
Adds commands to get diagnostics tree for widgets and render objects to Flutter Driver.
Related Issues
Fixes #29375.
Tests
I added the following tests:
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change
Does your PR require Flutter developers to manually update their apps to accommodate your change?