flutter / flutter/devtools

Specify that widget rebuilds is only available when running in debug-mode

Đang mở Phù hợp với người mới
#9,730 4 bình luận 0 reaction 0 người được giao Xem trên GitHub
contributions welcome good first issue P2 screen: performance
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ả

Currently when you run your app in profile-mode, the performance panel shows a disabled checkbox that makes it seem like it should be possible to "count widget builds" (see screenshot below)

In actuality, "count widget builds" relies on the `trackRebuildDirtyWidgets` service extension, which uses `debugOnRebuildDirtyWidget`. This is only available in debug-mode: https://github.com/flutter/flutter/blob/f9e809913240552c391bf31b1cfdbdf410224d8c/packages/flutter/lib/src/widgets/debug.dart#L59

Instead of "To see widget rebuilds for Flutter frames, enable `CountWidgetRebuilds`", we should remove the checkbox and update the text to say "Rebuild information not available for this frame. Widget rebuild counts are only available when running an app in debug-mode."

Image

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

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

Hướng nghiên cứu

Bắt đầu trong phần mã của bảng hiệu suất, nơi render checkbox xây dựng lại widget bị vô hiệu hóa và văn bản "To see widget rebuilds"; theo dõi cách phần này xử lý service extension trackRebuildDirtyWidgets và giới hạn của debugOnRebuildDirtyWidget được mô tả trong packages/flutter/lib/src/widgets/debug.dart. Được xem là hoàn tất khi các frame ở profile-mode hiển thị thông báo không khả dụng được chỉ định mà không có checkbox, trong khi hành vi ở debug-mode vẫn có thể sử dụng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
dart
Lĩnh vực
devtools
Loại issue
Lỗi
Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Đặc tả rõ ràng
Mức phù hợp với người mới
74/100

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.