Running & Building
Running in Debug Mode
flutter run
To target a specific device:
flutter run -d <device-id>
| Target | Example device ID |
|---|---|
| Android emulator | emulator-5554 |
| Physical Android | RF8M12ABCDE |
| iOS simulator | iPhone 15 Pro |
| Chrome (web) | chrome |
Hot Reload Controls
| Key | Action |
|---|---|
r |
Hot reload (preserves state) |
R |
Hot restart (resets state) |
q |
Quit |
Release Builds
Android — Universal APK
flutter clean && flutter pub get
flutter build apk --release
Output: build/app/outputs/flutter-apk/app-release.apk
Android — Split APKs
flutter build apk --split-per-abi
Android — App Bundle (Play Store)
flutter build appbundle --release
iOS
flutter clean && flutter pub get
cd ios && pod install && cd ..
flutter build ios --release
Web
flutter build web --release
macOS Desktop
flutter build macos --release
Utility Commands
# Analyze for lint issues
flutter analyze
# Format code
dart format lib/
# Run tests
flutter test
# Regenerate app icons
flutter pub run flutter_launcher_icons
# Clean and reinstall
flutter clean && flutter pub get