Change App Package Name for Flutter with Ease
Published on by Flutter News Hub
As a developer, you may occasionally need to update your Android app's package name. This can be a time-consuming and complex process, involving manual updates to multiple files.
However, with "Change App Package Name," a Flutter package, you can streamline this process with just a single command.
What It Does
- Updates AndroidManifest.xml files for release, debug, and profile builds
- Modifies build.gradle file
- Refactors MainActivity file, supporting both Java and Kotlin versions
- Moves MainActivity file to the new package directory
- Removes old package directory
How to Use
- Add the package to your
pubspec.yaml
file:
dev_dependencies:
change_app_package_name: ^1.1.0
- Run this command to change the package name:
flutter pub run change_app_package_name:main com.new.package.name
Replace com.new.package.name
with your desired package name.
Example
Before:
After:
Meta Information
- Creator: Atiq Samtia
- License: MIT
- GitHub: github.com/atiqsamtia/change_app_package_name
Contributing
Contributions are welcome! To contribute:
- Fork the repository
- Create a feature branch
- Implement your changes
- Create a pull request
Conclusion
"Change App Package Name" significantly simplifies the process of updating your app's package name, saving you time and effort.