website
website copied to clipboard
Explanation of 'const' optimization is missing
Page URL
https://docs.flutter.dev/get-started/fundamentals/widgets
Page source
No response
Describe the problem
I am completely new to flutter, and I noticed that widgets are mostly passed including a 'const'. I find it kind of weird that there is no explanation provided for why the 'const' is included (why it is 'preferred/required').
Expected fix
No response
Additional context
No response
I would like to fix this problem.
- [ ] I will try and fix this problem on docs.flutter.dev.
Not a bad idea, @dalanicolai. Meanwhile, here's a very good answer generated by AI. (Short answer: for performance.)