Meskipun Flutter berkinerja baik secara default, mengoptimalkan performa melibatkan meminimalkan rebuilds yang tidak perlu, list rendering yang efisien, penggunaan const yang tepat, menghindari pekerjaan yang mahal di build, dan profiling. Memahami ini membuat aplikasi tetap lancar (60/120 fps).
Meminimalkan rebuilds yang tidak perlu
✓ Use CONST constructors where possible → const widgets aren't rebuilt (huge win)
const Text('Static') // not rebuilt unnecessarily
✓ Keep setState/rebuild scope SMALL → rebuild only what changed (extract widgets so
state changes rebuild a small subtree, not the whole screen)
✓ Use targeted state management (rebuild only widgets that depend on changed state)
✓ Don't rebuild large trees for small changes
