flutter / flutter/devtools

[User reported] On-device inspector doesn't always select a widget in an overlay

Đang mở
#9,555 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
cost: high P2 screen: inspector
Ngôn ngữ chính
Dart
Star
1.7k
Fork
404
Merge trung bình
6 ngày 17 giờ
Pull request đã merge (30 ngày)
18

Mô tả

This is a user-reported issue from the 2025 DevTools user survey.

A couple users reported that the on-device inspector doesn’t always select a widget in an overlay.

---

### Details:

Currently widget inspection does not work very well for cases such as overlays. The inspector is currently relying on a RenderObject’s hitTest, which doesn’t work for all cases.

It’s also difficult to figure out where to click in order to actually select a widget.

**A few ideas for how this might be improved:**
* Show bounding boxes on hover (see https://github.com/flutter/devtools/issues/7762)
* Along with hitTest, add a hitDebug method to some RenderObjects that would be used instead.
* If a hit test matches multiple routes, then choose the top one.
* Tie each pixel to a single RenderObject
* By default, only select widgets in a user’s project (implemented in https://github.com/flutter/flutter/pull/176530)

---

Related issue: https://github.com/flutter/devtools/issues/4869

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.