Unable to create desktop application support from existing project in flutter

2.1k views Asked by At

I am creating a desktop application from an existing app. The command given in documentation is :

flutter create .

Running this command in the root of the project directory I am getting this error

"MyApp" is not a valid Dart package name.

Note: MyApp is name of my project

2

There are 2 answers

0
Abhilash Chandran On BEST ANSWER

Flutter only allows project names that are lower case letters and may contain an underscore or a number. This is actually a convention from dart packages. Check here for the prescribed convention. It is likely that your folder name is used by flutter as its project name. You can try to overcome this by changing the folder name. But please do keep a backup before doing flutter create on an existing project. For more details on possible options check this post as well.

0
Sarthak Raval On

write app name in lowercase

flutter create myapp