Reputation: 91
I would like to create a flutter project but I don't want to include the android and iOS version build folders and functionalities.
How can I make this to create with the web build only?
Upvotes: 7
Views: 6247
Reputation: 95
If you want to create your project only for Android & iOS, use this command:
--platforms=android,ios
Example:
flutter create [PROJECT_NAME] --platforms=android,ios
Upvotes: -2
Reputation: 2526
If you only need Web, Linux and Windows :
flutter create --platforms=web,linux,windows
If you only need Web :
flutter create --platforms=web
Upvotes: 6
Reputation: 21629
flutter create --platforms=web <name>
See flutter --help create
for full documentation of the platforms
flag, as well as all the other creation options.
Upvotes: 12
Reputation: 3235
There is no command to create a project for web only. The flutter create
command only takes one argument and that is the project directory/name. flutter create <DIRECTORY>
, like shown on the Flutter CLI reference.
If you don't need an iOS/Android app you can delete the ios
and android
folders.
And to build your app for web you can run flutter build web
.
Upvotes: 0