Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between `flutter run` and `flutter build` command?

Tags:

flutter

I'm new to Flutter dev and I'd like to know the difference between flutter run command and flutter build command.

Thanks.

like image 238
Keisuke Nagakawa 永川 圭介 Avatar asked Apr 23 '26 06:04

Keisuke Nagakawa 永川 圭介


2 Answers

You need to use flutter build command with one of following parameters: apk, appbundle, ios. This will produce an application to deploy or publish on AppStore, PlayStore, or some other distribution channels like Firebase.

The flutter run command will run your application on a connected device, or iOS simulator, or Android Emulator. You can also use --verbose command to get a detailed log while running the application.

like image 118
Akif Avatar answered Apr 25 '26 17:04

Akif


The command flutter run --release compiles to release mode. Your IDE supports this mode. Android Studio, for example, provides a Run > Run… menu option, as well as a triangular green run button icon on the project page. You can compile to release mode for a specific target with flutter build .

like image 28
Janvi Patel Avatar answered Apr 25 '26 18:04

Janvi Patel