How to improve speed and performance of Flutter apps

  • By using Stateless Widgets
  • Subdivide heavy build functions
  • Avoid helper functions for rendering the user interface
  • Subdivide Big Widgets Into Smaller Widgets
  • Avoid re-creating widgets: Avoid using setState to rebuild StatefulWidgets that will impact app performance. When a user interacts with the widget, the entire view is updated, modifying the scaffold, background widget, and container — greatly increasing the app’s load time.
  • Make use of persistent widgets: Constant widgets are initialized at compile time. This will result in a frequent re-build while executing const widgets, this can be solved by using final keywords in suitable ways.
  • Load list items quickly and on-demand: When working with list items, developers often use the widgets SingleChildScrollView and Column in collaboration. If you continue to use the same collection of widgets while working with large lists, things may rapidly get cluttered. This is because each item is added to the list and then presented on the screen, increasing the total load on the system.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store