Sifer
Sifer

Reputation: 91

how do i create a flutter project without the android and iOS build folders, only for web build only?

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

Answers (4)

Mohammad Reza
Mohammad Reza

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

Jack'
Jack'

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

smorgan
smorgan

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

Andrej
Andrej

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 androidfolders.

And to build your app for web you can run flutter build web.

Upvotes: 0

Related Questions