flutter / flutter/flutter-intellij
Provide information about Element and RenderObject rebuilds in "Widget Rebuild Stats"
- Dominant language
- Java
- Stars
- 2k
- Forks
- 356
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 27
Description
I'm currently trying to understanding when Flutter needs to rerender a Widget and asked a [StackOverflow question ](https://stackoverflow.com/q/67345485/25282) about it. While a more detailed past [video](https://www.youtube.com/watch?v=996ZgFRENMs) talked about the associated life cycle but not in detail the Flutter team published a new video basically saying "there's no life cycle" Flutter is doing smart magic.
This is a bad approach to communicating how Flutter works because it leads to people not understanding what's relevant for performance and develop superstitions about how the magic works and write some code more complicated for no good reason as a recent [thread on Reddit](https://www.reddit.com/r/FlutterDev/comments/mp4xpx/methods_vs_stateless_widget_to_return_widgets/
) suggests. It seems that given that [someone said](https://youtu.be/vVg9It7cOfY?t=1267) that you can optimize performance of a ListView by using a stateless Widget instead of a function, the superstition developed that it's generally more performant to use stateless Widgets over functions.
The fact that in the Flutter performance tab Flutter lists "Widget Rebuild Stats" strongly suggests that this is what matters for performance. If it doesn't matter much because what matters is element and renderObject rebuilds then the "Widget Rebuild Stats" tab should show those as well.
Contributor guide
Assessment
This issue has not been assessed yet.