Search packages, repositories and app categories

Package detailsv1.5.0

change_app_package_name

Change App Package Name with single command. Update AndroidManifest, build.gradle, MainActivity files & move MainActivity file to new directory structure automatically.

AndroidiOSmacOSWindowsLinux
30-day downloads
190K
Likes
2K
Pub points
130

Install package

flutter pub add change_app_package_name

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

A Flutter package that simplifies changing an app's package name with a single command. It automatically updates the AndroidManifest.xml, build.gradle files, and MainActivity, while also relocating the MainActivity to the new directory structure. Designed for developers who need to rebrand or refactor their app’s package name efficiently across multiple platforms. The tool ensures consistency and reduces manual errors during migration.

Use cases

  • Rebranding an existing app
  • Refactoring app structure
  • Migrating to a new package namespace
  • Preparing app for publishing under a new name
  • Streamlining multi-platform package updates

Key features

  • Single command execution
  • Automated file updates
  • Directory structure adjustment
  • Cross-platform support (Android, iOS, macOS, Windows, Linux)
  • Preserves app functionality during rename

Suitable for

  • Flutter developers managing app branding
  • Teams refactoring app architecture
  • Developers preparing apps for release with new identities
  • Those seeking automation in package name changes

Considerations

  • Backup project before use
  • Ensure no custom package references exist
  • Verify app functionality post-rename
  • Check for third-party plugin compatibility
  • Manual review recommended after execution

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

Change App Package Name for Flutter

Change App Package Name with single command. It makes the process very easy and fast.

What It does?

  • [x] Update AndroidManifest.xml files for release, debug & profile
  • [x] Update build.gradle file
  • [x] Update MainActivity file. Both java & kotlin supported.
  • [x] Move MainActivity file to new package directory structure
  • [x] Delete old package name directory structure.
  • [x] Update Product Bundle Identifier in iOS.
    • if you have customized CFBundleIdentifier in Info.plist, it will not be updated. You have to update it manually.
  • [x] Specify which platform they want to rename the package for.

How to Use?

Add Change App Package Name to your pubspec.yaml in dev_dependencies: section.

dev_dependencies: 
  change_app_package_name: ^1.4.0

or run this command

flutter pub add -d change_app_package_name

Not migrated to null safety yet? use old version like this

dev_dependencies: 
  change_app_package_name: ^1.4.0

Update dependencies

flutter pub get

Run this command to change the package name for both platforms.

dart run change_app_package_name:main com.new.package.name

To rename only Android:

dart run change_app_package_name:main com.new.package.name --android

To rename only IOS:

dart run change_app_package_name:main com.new.package.name --ios

Where com.new.package.name is the new package name that you want for your app. replace it with any name you want.

Meta

Atiq Samtia– @AtiqSamtia – me@atiqsamtia.com

Distributed under the MIT license.

https://github.com/atiqsamtia/change_app_package_name

Contributing

  1. Fork it (https://github.com/atiqsamtia/change_app_package_name/fork)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

Categories

Source repository

Projects using this package