Launch the app in profile mode as follows:

In VS Code, open your launch.json file, and set the
flutterMode property to profile
(when done profiling, change it back to release or debug):

    
"configurations": [
  {
    "name": "Flutter",
    "request": "launch",
    "type": "dart",
    "flutterMode": "profile"
  }
]

In Android Studio and IntelliJ, use the
Run > Flutter Run main.dart in Profile Mode menu item.

From the command line, use the --profile flag:

    
$ flutter run --profile

For more information on the different modes,
see Flutter’s build modes.

You’ll begin by opening DevTools and viewing
the performance overlay, as discussed in the next section.

Launch DevTools