Release mode

In release mode, debugging information is stripped out from the app and the compilation is realized with performance in mind. Remember, in release mode, like the profile, the application can only be run on physical devices, for the same reasons too.

To compile in release mode, we just need to add the --release flag to the flutter run command and have a physical device connected. Although we can do so, we typically do not use the flutter run command with the --release flag. Instead, we use this flag with the flutter build command to have a built app file in the target Android/iOS formats for distribution.

Get Flutter for Beginners now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.