Flutter package rename
Quickest and cleanest way to change your package name!
Warning:
If you have edited the contents of the folders android/, ios/ and windows/, you need to make sure you have those changes backed up somewhere before proceeding.
1. Delete your folders at the root of your flutter project:
android/ios/windows/build/
Let's say you want to rename from com.oldcompany.oldproject to com.newcompany.newproject.
2. Launch the following command from the root of your project:
flutter create --org com.newcompany --project-name newproject .
If you want to limit your projects to specific platforms (for example android and iOS) run :
flutter create --platforms=android,ios --org com.newcompany --project-name newproject .
PS:
To make sure everything is set up correctly, you can search for your package names in your files, by running the following commands
grep --color -r com.oldcompany.oldproject *
grep --color -r com.newcompany.newproject *
Comments
Post a Comment