Unable to create desktop application support from existing project in flutter

1,125

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.

Share:
1,125
S Sharanya Bharghavi
Author by

S Sharanya Bharghavi

I am a very tech enthusiastic student developer.

Updated on December 01, 2022

Comments

  • S Sharanya Bharghavi
    S Sharanya Bharghavi over 1 year

    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

    • Bob
      Bob over 3 years
      Why are you "creating" it if it already existed?