提高渲染性能

Rendering animations in your app is one of the most citedtopics of interest when it comes to measuring performance.Thanks in part to Flutter’s Skia engine and its abilityto quickly create and dispose of widgets,Flutter applications are performant by default,so you only need to avoid common pitfalls to achieveexcellent performance.

If you are seeing janky (non smooth) animations, makesure that you are profiling performance with anapp built in profile mode.The default Flutter build creates an app in debug mode,which is not indicative of release performance.For information,see Flutter’s build modes.

A couple common pitfalls:

  • Rebuilding far more of the UI than expected each frame.To track widget rebuilds, see Show performance data.
  • Building a large list of children directly, rather thanusing a ListView.

For more information on evaluating performanceincluding information on common pitfalls,see the following docs: