7

I've a flutter project in Visual Studio Code uploaded in git too. Now I want to create a new project with different package and AppName by changing existing one. How can I do that? hope you guys understand what I am talking about. Thanks in advance

1 Answer 1

10

You can use rename package to rename your appname and packagename and bundle id and everything. Just install it globaly so you can use it everywhere.

flutter pub global activate rename

Then navigate to your project directory and change the bundleId (package name) and appname:

 flutter pub global run rename setBundleId --value com.onatcipli.networkUpp
 flutter pub global run rename setAppName --value "Network Upp"

You can also make a copy of your project before doing all this, so you can have both versions.

Changing the app icon

If you want to change the app icon as well, use this method after renaming:

https://stackoverflow.com/a/52829977/5423747

What I do

Usually I have to remake same package for different organizations. I have a main project in git is stable branch, then I make new branch from stable branch and repeat the methods above.

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

8 Comments

would be change the package name too?
The bundleId is same as the package name. (the first line)
@MuhammadFaisal Then I'd suggest making your base code a package/sdk so the new features and updates would apply on all your projects.
Thanks for the suggestion, but the program itself is a full custom, so it's possible that the package/sdk maybe will also be full customized too, soo yeah, i think i will customize it only to changes requested..
The CLI has been updated, the command now looks as follows: flutter pub global run rename setAppName --value [your app name] and flutter pub global run rename setBundleId --value com.example.appname
|

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.