To run a Flutter app in release mode:
flutter run --release
Make sure you have set up signing for your app before running in release mode, which is required for publishing to app stores. You can also make use of the command flutter build apk --release to build the release APK for android.
flutter build apk --release
Please note that when you run the app in release mode, the Dart compiler will be invoked with the --deterministic flag, which will ensure that the generated machine code is the same across multiple runs, this will reduce the size of the final APK.
0 Comments