Design a site like this with WordPress.com
Get started

Optimize Flutter Apps: Fast Flutter App Performance

Flutter is performant by default . Developers behind Flutter and Dart have spent an enormous amount of time to make their performance near-native . However, as we have recently developed & released the Rokomari app , Bangladesh’s largest online bookseller app using Flutter (Dart) – I have found several peak-points that require optimization .

Flutter, powered by Dart language, is an open-source SDK by Google to develop apps for Android, iOS, Linux, Windows, MacOS and the web from a single codebase .

Here, I share tips to optimize a Flutter app, from my experience, that scales:

  1. Avoid heavy-works on the main thread
  2. Employ isolates wherever necessary
  3. Mark static widgets as const
  4. Avoid rebuilding widgets
  5. Remove Container() if unnecessary
  6. Prefer SizedBox() or Nil() instead of blank Container()
  7. Use StatelessWidget if StatefulWidget is of no use
  8. Keep the Widget build() as simple as possible
  9. Avoid color gradients
  10. Add shrinkWrap:true to ListView.builder
  11. Apply RepaintBoundary() in animation works
  12. Cache both local and networked images
  13. Employ dispose() to release object memories
  14. Compress (encode and decode) data
  15. Make Color codes const
  16. Keep Flutter and Dart up-to-date
  17. Produce architecture-specific builds separately for phones, tablets and desktops

These tips will ensure a fast & lightweight high-performing Flutter app that runs on multiple platforms .

Advertisement

Published by Farial Mahmod Tishan

Life-long learner. Developing Flutter apps on Parrot Linux OS .

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: