How does using const constructors improve Flutter performance?
const widgets are canonicalized at compile time — Flutter creates them once and reuses the same instance. W...
15 questions
Rebuild optimization, memory leaks, DevTools
const widgets are canonicalized at compile time — Flutter creates them once and reuses the same instance. W...
RepaintBoundary creates a new compositor layer, isolating its subtree from parent repaints. Use it around c...
ListView.builder builds only the visible items lazily. ListView() with a children: list builds all items up...
Flutter's ImageCache holds decoded bitmaps in memory (default: 100MB or 1000 images). For network images, u...
Use Flutter DevTools' Performance tab to record a trace, identify janky frames (>16ms for 60Hz), and pinpoi...
Each Theme.of(context), MediaQuery.of(context), etc. call walks up the element tree to find the nearest Inh...
Shader compilation jank is a dropped frame that occurs the first time Flutter renders a new visual effect (...
Move CPU-intensive work (JSON parsing, image processing, encryption, sorting large lists) to an Isolate usi...
Common leaks: not canceling StreamSubscriptions, not disposing AnimationControllers/TextEditingControllers,...
Use cached_network_image for automatic disk+memory caching. Always set cacheWidth/cacheHeight to decode at ...
Debug: JIT compilation, hot reload, all assertions enabled — slowest (60-70% slower than release). Profile:...
Flutter renders via three threads: UI thread (Dart, builds widget/element/render trees, layout, paint), Ras...
Always use ListView.builder / GridView.builder for dynamic lists — they lazily build only visible items. Ne...
Shader compilation jank: the first time an animation runs, the GPU compiles the shader on-the-fly, causing ...
Reduce startup time: defer heavy initialization (analytics, database) to post-startup, use lazy-singleton s...