I am not sure what is wrong with my Android Studio IDE, but whenever I run the app inside flutter it always runs on debug mode. Please see the label on the right side of the corner.

Logs:
Launching lib\main.dart on POCO F1 in debug mode...
Initializing gradle... Resolving dependencies... Running Gradle task 'assembleDebug'... Built build\app\outputs\apk\debug\app-debug.apk. Installing build\app\outputs\apk\app.apk... Syncing files to device POCO F1...
“flutter only on debug mode” Code Answer'sOn your MaterialApp set debugShowCheckedModeBanner to false.
Have you tried running your code in "release" mode?
Within a terminal you can do that via flutter run --release.
In Android Studio you could double tap shift to bring up the search everywhere command window. If you simply type release you should be able to find the Flutter Run main.dart in Release Mode command.

Also you can find this in the menu under "Run" just like so:

App by default runs on debug mode, it is bit janky but needed to provide features like hot reload and hot restart. However, if you want to run the app in other modes, try these commands:
Release mode:
flutter run --release
Profile mode:
flutter run --profile
You can also add these flags in IDE, click on main.dart in the toolbar:

Add --release flag in the Additional run flags option

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With