flutter / flutter/devtools

Support inspection for Flutter themes

Đang mở
#483 2 bình luận 14 reaction 0 người được giao Xem trên GitHub
new feature 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ả

The Flutter Inspector should make inspecting themes in Flutter as easy as inspecting what CSS styles apply to an HTML element.

We are far away from that currently. Currently if you know exactly where to look you can sometimes see what the rendering styles are but you cannot determine why the rendering styles are the way they are.

Potentially the correct Kernel transformer combined with static analysis of the code for a Widget could let us determine what themes applied to Widget and even what values from the Theme were used.

Example use case from @willlarche
I have an icon and I need to make sure it's not black but dark brown. You can't tell really with the naked eye. But when I inspect it, I don't get the info on its color anywhere I look:
![image](https://user-images.githubusercontent.com/1226812/45962696-4e28bf80-bfd6-11e8-8e41-c5d8d22a6d87.png)
![image](https://user-images.githubusercontent.com/1226812/45962707-5680fa80-bfd6-11e8-97c2-4a2dbe4e5daf.png)
![image](https://user-images.githubusercontent.com/1226812/45962725-600a6280-bfd6-11e8-96b2-1a17a3fa3b1f.png)
And it's themed so chances are the 'default' isn't what's being shown. Would love to know which theme is giving me that value.

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.