Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set package in VS Code when creating a project

Is there a way to set default package in VS Code? (com.example.myproject) I can only do this in Android studio. So I used it to create a project and then I open it in VS Code.

I mean when creating via: (Ctrl+Shift+P ➡ New flutter project)

like image 878
GusZL Avatar asked Oct 15 '25 07:10

GusZL


1 Answers

To change the default organization from com.example to your own, perform the following steps:

  1. Open Settings in VS Code
  2. Type "flutter" in the search bar
  3. Select Dart & Flutter under Extensions
  4. Scroll down to Dart: Flutter Create Organization
  5. Click Edit in settings.json
  6. Add the following line to the JSON list:

    "dart.flutterCreateOrganization": "com.mydomain",
    
  7. Save the file and create a new project

Your package name should be correct now and you can confirm it like this.

like image 71
Suragch Avatar answered Oct 17 '25 22:10

Suragch



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!