All other answers did not show the most correct description of the arguments of the flutter create
.
The argument that has no name does NOT represent the name of your project, but it mainly represents the name of the folder, in which your project will be created, and in case --project-name
argument is passed, the project name will be as same as the folder.
This is mentioned in the flutter create --help
:
Usage: flutter create <output directory>
--project-name The project name for this new Flutter project. This must be a valid dart package name.
So in simple examples:
Creates a new project in the current directory (notice the dot .
) without creating any new folder:
flutter create --project-name project_name .
Creates a new project in a new folder (whose name is different than the project's name):
flutter create --project-name some_name some-folder-name
Creates a new project in a new folder which has the same name:
flutter create some_name
Creates a new project in the current directory, by also specifying the fully qualified package name or Id (for Android and IOS):
flutter create --project-name some_name --org com.COMPANY .
One benefit of that, is if you want to create a Flutter project directly in a folder that does not follow the same naming rules that flutter projects/packages must follow (e.g. no dashes).