Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Performance Tips and Tricks in Flutter

Samuel Baraka
November 18, 2022
32

Performance Tips and Tricks in Flutter

These are my slides for the session at droidcon 2022 kenya. This session was about how optimise the on-device performance of your flutter application.

Samuel Baraka

November 18, 2022
Tweet

Transcript

  1. Performance tips and tricks in fl utter Get that optimal

    performance Samuel Baraka Senior Flutter Developer Kwikbasket @sababuvercetti
  2. What is performance This is basically a measure of how

    a fl utter app behaves under a variety of load conditions
  3. Why performance matters Great performance matters in fl utter applications

    because we want our Users to have the best experience as much as possible.
  4. Flutter Apps - Outside the box, fl utter apps perform

    well. - But in your development, you may fall for practices which will impact the Performance of your fl utter application
  5. Why stateful When you want to change the appearance of

    the widget in response to user events.
  6. Avoid widget methods Widget methods trigger, change in state will

    trigger the entire wrapping widget to be rebuilt, unlike using a widget(Stateless or Stateful)
  7. Cache widgets If a subtree does not change, cache it

    - assign a widget to a fi nal state variable and re-use it in the build method.
  8. QA