Flutter package
Change Package Name
Rename your Flutter app's package identifier across every platform, with one command.
MIT
AndroidiOSLinuxmacOSWindows
Overview
Renaming a Flutter app's package or bundle identifier after the fact usually means hand-editing AndroidManifest.xml, build.gradle, MainActivity and Info.plist, then moving files to match. change_package_name does all of it from the command line, for Android and iOS together or one at a time.
Features
- Updates AndroidManifest.xml across release, debug and profile variants
- Updates build.gradle with the new applicationId
- Rewrites MainActivity for both Java and Kotlin projects
- Moves MainActivity into the new package directory structure and removes the old one
- Updates the iOS Product Bundle Identifier
- Target Android only, iOS only, or both in a single run
Installation
pubspec.yaml
dev_dependencies:
change_package_name: ^1.1.1or
flutter pub add -d change_package_nameUsage
Terminal
dart run change_package_name:main com.new.package.name
dart run change_package_name:main com.new.package.name --android
dart run change_package_name:main com.new.package.name --iosRead this offline
The same write-up as a .docx file, if you'd rather share it or keep a copy.