Flutter Performance: 10 Practical Tips for a Smooth App

Ten practical ways to make a Flutter app faster — fewer rebuilds, lazy lists, image sizing, isolates, and profiling with DevTools in profile mode.

Darko Bačić, authorDarko Bačić 4 min read
On this page
  1. 1. Measure in profile mode, on a real device
  2. 2. Use const constructors
  3. 3. Rebuild less
  4. 4. Build long lists lazily
  5. 5. Decode images at the size you show them
  6. 6. Move heavy work off the UI thread
  7. 7. Be careful with expensive effects
  8. 8. Don't do work in build()
  9. 9. Dispose what you create
  10. 10. Watch app size and startup
  11. A quick pre-launch checklist

Flutter is fast by default, but it's still easy to build a screen that stutters while scrolling or freezes for a moment when data loads. Almost every case we've fixed came down to one of a handful of causes. Here are the ten checks we run on every app before launch.

##1. Measure in profile mode, on a real device

Debug mode is much slower than what users get, so never judge performance there. Run on a real phone — ideally an older Android device — in profile mode:

bash
flutter run --profile

Then open Flutter DevTools and use the Performance view. Look for frames that take longer than the frame budget (about 16 ms at 60 Hz) and check whether the time is spent in the UI thread (your Dart code and builds) or the raster thread (drawing).

##2. Use const constructors

A const widget is created once and skipped during rebuilds. Turn on the prefer_const_constructors lint and let your editor add const wherever it can.

dart
const Padding(
  padding: EdgeInsets.all(16),
  child: Text('Welcome'),
)

##3. Rebuild less

Calling setState high in the tree rebuilds everything below it. Move state down to the widget that actually changes, split large build methods into smaller widgets, and with your state-management library listen only to the value you need (for example context.select with Provider, or ref.watch on a narrow provider with Riverpod).

##4. Build long lists lazily

ListView(children: [...]) builds every item up front. For anything longer than a screen, use a builder so only visible items are built:

dart
ListView.builder(
  itemCount: items.length,
  itemBuilder: (context, i) => ItemTile(item: items[i]),
)

If all rows have the same height, set itemExtent (or prototypeItem) so Flutter doesn't have to measure each one.

##5. Decode images at the size you show them

A 4000×3000 photo shown as a 100×100 thumbnail still gets decoded at full size unless you tell Flutter otherwise. Use cacheWidth / cacheHeight, and a caching package for network images:

dart
Image.network(
  url,
  width: 100,
  height: 100,
  cacheWidth: 300, // ~3x for high-density screens
  fit: BoxFit.cover,
)

##6. Move heavy work off the UI thread

Parsing a large JSON response or processing images on the main isolate blocks rendering. Use Isolate.run (or compute) for anything that takes more than a few milliseconds:

dart
final products = await Isolate.run(() => parseProducts(responseBody));

##7. Be careful with expensive effects

Opacity, ClipPath, BackdropFilter and shadows on many widgets can be costly to draw, especially while animating. For fades, prefer FadeTransition or AnimatedOpacity; for images, set opacity on the image itself. Wrap complex, frequently repainting areas (like an animated chart) in a RepaintBoundary so they don't force their neighbours to repaint.

##8. Don't do work in build()

build can run many times a second. Never start network requests, create controllers or sort big lists inside it. Do that in initState, in your state-management layer, or cache the result.

##9. Dispose what you create

Controllers, streams, timers and listeners that aren't disposed keep running after a screen closes, wasting CPU and memory. Every AnimationController, TextEditingController, StreamSubscription and Timer you create needs a matching dispose or cancel.

##10. Watch app size and startup

Startup time is performance too. Defer loading of rarely used features, avoid doing heavy work before the first frame, compress assets, and check what makes your app big:

bash
flutter build apk --analyze-size

##A quick pre-launch checklist

  • Scroll every list on a low-end Android phone in profile mode.
  • Open each screen twice and check DevTools for slow frames.
  • Check memory in DevTools after navigating back and forth a few times.
  • Test on a slow network so loading states, not frozen screens, are what users see.

Performance is one of the things store reviewers and users notice first. If you're comparing frameworks, our Flutter vs React Native guide covers how each handles rendering.

##Frequently asked questions

Why is my Flutter app slow in debug mode?+

Debug mode includes extra checks and runs Dart in a slower mode built for hot reload. Always measure performance with flutter run --profile on a real device.

How do I find what's slowing down my Flutter app?+

Run in profile mode and open the Performance view in Flutter DevTools. It shows each frame's build and raster time, so you can see which frames are slow and what was running.

Is Flutter as fast as native?+

For most apps, yes. Flutter compiles to native machine code and renders with its own engine, so well-built Flutter apps scroll and animate smoothly on both iOS and Android.

Does using const really make a difference?+

Yes, especially in lists and frequently rebuilt screens. Const widgets are reused instead of rebuilt, which reduces work on every frame.