Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create a new app for either iOS or Android using Flutter

Tags:

flutter

How to create a new project using Flutter either for iOS or Android?

I tried with flutter create projectname but it is creating both iOS and Android platform.

Is it possible for any one platform?

like image 209
gamerb Avatar asked Jun 11 '26 23:06

gamerb


1 Answers

You can use the --platforms parameter to specify which platforms you want to create the app for (defaults to all of them). So, if you want to create an app for only android you would do something like the following:

flutter create --platforms android my_app

Note: the -i and -a parameters are for selecting the language used, not restricting which platforms are generated.

Lastly: It does seem that you can simply delete the undesired platform directories after they are generated.

like image 160
cjstehno Avatar answered Jun 13 '26 18:06

cjstehno



Donate For Us

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