1

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

1
  • Why are you "creating" it if it already existed? Commented Nov 28, 2020 at 10:29

2 Answers 2

5

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.

Sign up to request clarification or add additional context in comments.

Comments

1

write app name in lowercase

flutter create myapp

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.