Jank kills apps. Users notice dropped frames more than almost any other quality issue, and Flutter's tooling makes it deceptively easy to ship a beautiful-looking app that secretly runs at 45fps on mid-range devices. After optimising dozens of production Flutter apps — including some with 300K+ daily active users — here are the 10 tricks we reach for first.
Use const Constructors Everywhere
This is the single highest-impact, lowest-effort optimisation. When a widget is const,
Flutter skips it entirely during rebuilds. Audit your widget tree with a simple regex search for
widgets that could be const but aren't.
// Bad — rebuilt every frame
Text('Hello World')
// Good — never rebuilt
const Text('Hello World')
Enable the prefer_const_constructors lint rule in your
analysis_options.yaml so the analyser catches these automatically.
Scope Your setState (and Riverpod / Bloc Rebuilds)
Calling setState on a parent widget rebuilds the entire subtree. Extract the piece of UI
that actually needs to change into its own widget so only it rebuilds. The same principle applies to
Consumer widgets in Riverpod — keep them as small as possible.
Use ListView.builder — Never ListView with Children
A ListView with an explicit children list renders all items
upfront, even off-screen ones. ListView.builder is lazy — it only builds visible items.
For lists of more than ~20 items, this is non-negotiable.
// Avoid for long lists
ListView(children: myItems.map((i) => ItemCard(i)).toList())
// Use this
ListView.builder(
itemCount: myItems.length,
itemBuilder: (context, index) => ItemCard(myItems[index]),
)
Cache Network Images with cached_network_image
Re-downloading and re-decoding images on every scroll is an enormous waste of memory and CPU. The
cached_network_image package gives you persistent disk caching with a placeholder and
error builder in two lines of code.
Move Heavy Computation to an Isolate
Dart is single-threaded on the main isolate. JSON parsing of large payloads, image processing, or
cryptographic operations will block the UI thread and cause jank. Use compute() for a
fire-and-forget isolate, or Isolate.spawn for long-running tasks.
final parsed = await compute(parseHeavyJson, rawString);
Use RepaintBoundary to Isolate Animations
By default, an animating child can trigger repaints in its parent. Wrapping an animation in
RepaintBoundary gives it its own layer, so only it — not the whole tree — is repainted
on every frame. Use it for looping animations, video thumbnails, or any widget that changes
frequently.
Avoid Opacity Animations — Use AnimatedOpacity or FadeTransition
Wrapping a widget in an Opacity widget that animates its value forces Flutter to paint
the entire subtree offscreen and then composite it at the target opacity every frame.
FadeTransition (which drives the opacity of an
AnimatedOpacity) avoids this by using the GPU-accelerated compositing pipeline instead.
Profile on a Real Device — Not the Simulator
The iOS Simulator and Android Emulator use your Mac's CPU and GPU, which bear no resemblance to a
mid-range phone. Always run flutter run --profile on a physical device and use the
Flutter DevTools Performance tab to identify frame drops.
"We thought our app was smooth until we tested on a Xiaomi Redmi device. Isolate usage and
RepaintBoundarydropped our 99th-percentile frame time from 28ms to 11ms."
Lazy-Load Images with the addRepaintBoundaries Flag
When using ListView.builder, set addRepaintBoundaries: true (it's the
default, but make sure you haven't disabled it). This wraps each item in a
RepaintBoundary automatically, preventing a single item's repaint from cascading
through the list.
Reduce Shader Compilation Jank with Impeller
Shader compilation jank — the one-time stutter the first time a new visual effect is rendered — has
plagued Flutter on iOS for years. Enable Impeller (Flutter's new rendering engine,
now the default on iOS since Flutter 3.10) and verify it's active. On Android, opt in via the
enable-impeller flag in AndroidManifest.xml.
Run flutter analyze and flutter test --coverage in CI. A clean analyser
output and good test coverage won't directly improve runtime performance, but they prevent the
regressions that introduce it.
Putting It All Together
Performance is not a feature you bolt on — it's an ongoing discipline. Automate what you can (lints, CI profiling), measure on real devices, and fix the biggest bottleneck first. Most Flutter jank can be traced back to a handful of root causes: unnecessary rebuilds, unsized images, and main-thread blocking. The ten tricks above address all of them.