Warning:
  As stated in the checking total size section
  above, an upload package is not representative of your end users’ download
  size. Be aware that redundant native library architectures and asset densities
  seen in the breakdown tool can be filtered by the Play Store and App Store.

The size analysis tool is invoked by passing the --analyze-size flag when
building:

flutter build apk --analyze-size

flutter build appbundle --analyze-size

flutter build ios --analyze-size

flutter build linux --analyze-size

flutter build macos --analyze-size

flutter build windows --analyze-size

This build is different from a standard release build in two ways.

The tool compiles Dart in a way that records code size usage of Dart
packages.