flutter / flutter/devtools

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

Offen Anfängerfreundlich
#9,730 4 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
contributions welcome good first issue P2 screen: performance
Vorherrschende Sprache
Dart
Sterne
1.7k
Forks
404
Ø Merge
6 T. 17 Std.
Gemergte PRs (30 T.)
18

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Start in the performance panel code that renders the disabled widget-rebuild checkbox and the "To see widget rebuilds" text; trace how it handles the trackRebuildDirtyWidgets service extension and the debugOnRebuildDirtyWidget limitation described in packages/flutter/lib/src/widgets/debug.dart. Done means profile-mode frames show the specified unavailability message without a checkbox, while debug-mode behavior remains usable.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
dart
Bereich
devtools
Issue-Typ
Bug
Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Aktivitätsstatus
Aktiv
Klarheit
Klar beschrieben
Anfängerfreundlichkeit
74/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.