Specify that widget rebuilds is only available when running in debug-mode
- 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."
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