D
Flutter CoreBeginner10 XP2 min read

What is the difference between flutter run and flutter build for production?

TL;DR: flutter run starts the app in debug mode on a connected device/emulator; flutter build compiles the app for distribution — build apk/appbundle for Android, build ios for iOS, build web for web deployment.

Full Answer

Aspectflutter runflutter build
PurposeDevelopment / testingDistribution / production
OutputDebug build on deviceRelease artifact (APK/AAB/IPA)
Hot reloadAvailableNot applicable
CompilationJIT by defaultAOT always
🎯

For production releases, always use flutter build appbundle (Android) over flutter build apk — App Bundle allows the Play Store to deliver device-optimized APKs, reducing install size by 40-60%.

Interview Tip

💡

App Bundle (.aab) vs APK: .aab is uploaded to the Play Store, which generates optimized APKs per device configuration. Never ship a universal APK to the Play Store — use .aab.

#flutter-run#flutter-build#production#deployment