flutter / flutter/devtools

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

Aperta
#9,730 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub
contributions welcome good first issue P2 screen: performance
Lingua principale
Dart
Stelle
1.7k
Fork
404
Merge medio
6g 17h
PR unite (30g)
18

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.