Repository navigation
Selecting an Element from the Devtool Widget Tree does not highlight the element in Multi View Apps #5935
Description
Activity
- changed the title
[-]Selecting an[/-][+]Selecting an Element from the Devtool Widget Tree does not highlight the element in Multi View Apps[/+]on Jun 20, 2023 - marked this as a duplicate of Widget Inspector Selection broken in Multi View App #5932
on Jul 6, 2023 for the widgets_counter.dart example, nothing is highlighted when clicking on the following elements in the DevTools widget tree:
[root]
MultiViewApp
ViewCollection
View
Builder
Counter
MaterialApp- addedP3issues we think are valid but not importantissues we think are valid but not important
on Jul 17, 2023 Discussed this with the team and it was decided that
findRenderObjectreturns null then there is no need to highlight anything.That being said I believe the following should render as having a selection:
- View
- Builder
- Counter
- MaterialApp
Unfortunately I seem to run into issues when selecting those.
It looks like the size of the _RenderInspectorOverlay size is 0, so perhaps there is something that has changed with those widgets and the way we get their size and offset
https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/widgets/widget_inspector.dart#L3014After using the debugger I was able to realize that Anything MaterialApp and above isn't inspectable. Only Widgets under MaterialApp should be inspectable.
Tested in a single view app i can see the same behaviour.This still doesn't explain why widget inspection ends up breaking when clicking on theses widgets in multi view apps.
Now that I've got a clearer idea it should be easier to check how big of an issue this is, and whether using the same flutter engine for single view apps would cause the same issues.
So it looks like the breaking widget inspection had to do with a mysterious extra view showing up in the widget tree.
Then when inspecting an element in that view, the following error would get thrown: #6032After that it would seem as if the inspector behaviour had broken everywhere.
So it looks like this is all clear and the issue isn't caused by the widgets mentioned above :D
Flutter Engine issue that caused the Ghost View to show up:
flutter/flutter#131089
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
While testing a multi view app I turned on Select Widget Mode and tried to click elements in the Summary tree.
No elements were highlighted in the apps view.