Stop googling basic Flutter commands. Here are the 10 essential commands that'll cover 90% of your daily Flutter development.
Why These 10 Commands?
After 3+ years of Flutter development, I've realized that while there are dozens of Flutter commands, you really only need to master these 10 to be productive. Everything else is just nice-to-have.
1. flutter create
- Start Your Journey
# Basic project creation
flutter create my_awesome_app
# With custom organization (for app stores)
flutter create --org com.yourcompany my_app
When to use: Starting any new Flutter project. The --org
flag saves you from manually changing package names later.
2. flutter run
- Your Best Friend
# Run in debug mode (hot reload enabled)
flutter run
# Run on specific device
flutter run -d chrome
flutter run -d "iPhone 14 Pro"
Pro tip: Once running, use r
for hot reload and R
for hot restart. This command will be your most-used by far.
3. flutter pub get
- Dependency Magic
# Get all dependencies from pubspec.yaml
flutter pub get
# Quick way to add new packages
flutter pub add http
flutter pub add firebase_core
When to use: After cloning a project, adding new dependencies, or when you see "packages get" errors.
4. flutter clean
- The Universal Fix
# Clean build files
flutter clean
# My go-to troubleshooting combo
flutter clean && flutter pub get
When to use: When builds fail mysteriously, hot reload stops working, or you get weird dependency errors. This fixes 80% of Flutter problems.
5. flutter doctor
- Health Checkup
# Check Flutter installation
flutter doctor
# Detailed information
flutter doctor -v
When to use: Setting up Flutter, troubleshooting build issues, or before asking for help online. Always run this first when something's wrong.
6. flutter test
- Quality Assurance
# Run all tests
flutter test
# Run with coverage report
flutter test --coverage
# Run specific test file
flutter test test/models/user_test.dart
When to use: Before committing code, during development, or when setting up CI/CD. Good tests save you hours of debugging.
7. flutter build apk
- Android Release
# Debug APK for testing
flutter build apk --debug
# Release APK for distribution
flutter build apk --release
# App Bundle for Play Store (recommended)
flutter build appbundle --release
When to use: Testing on real devices, sharing builds with QA, or preparing for Play Store release.
8. flutter devices
- Know Your Options
# List all connected devices and emulators
flutter devices
# Launch emulator
flutter emulators --launch Pixel_4_API_30
When to use: Before running your app, when switching between devices, or troubleshooting device connection issues.
9. flutter analyze
- Code Quality
# Analyze Dart code for issues
flutter analyze
# Format code automatically
dart format .
Quick Reference Card
Copy this to your notes:
flutter create my_app # Create project
flutter run # Start development
flutter pub get # Get dependencies
flutter clean # Fix most problems
flutter doctor # Check setup
flutter test # Run tests
flutter build apk --release # Build Android
flutter devices # List devices
flutter analyze # Check code quality
flutter upgrade # Update Flutter
Final Thoughts
You don't need to memorize every Flutter command. Focus on these 10, practice them until they become muscle memory, and you'll be more productive than developers who know 50+ commands but can't use them efficiently.
Which command do you use most? Let me know in the comments!
Bookmark this for quick reference, and follow me for more Flutter tips! 🚀
Top comments (0)