Open In App

How to Change Package Name in Flutter?

Last Updated : 09 Oct, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

Every Flutter app has a package name that uniquely identifies your app on the Google Play Store and Apple App Store. In this article, we will learn how to change the package name with a simple and easy method. The package name is basically a unique identity to identify that app on App Store, Play Store, and different platforms just like the Aadhaar card in India to identify your personality. The package name can be divided into 3 parts.

domain_name.organization_name.project_name

  1. domain_name means your organization’s last name like com, edu, in, and many more.
  2. organization_name means your organization name to which that particular project belongs.
  3. project_name means your project name 

To easily understand 1 and 2 just think about the website name of that organization name. For example, if it is flutterwings.com then your organization name can be com.flutterwings. You can do this by 2 method 

  1. Manually on each and every place where it is written (But we didn’t prefer this because sometimes we can skip places to replace them with the new package name)
  2. Through package on the pub.dev

Let’s start with the 2nd one

Step 1: Import this package in dev dependency in your flutter project 

https://pub.dev/packages/change_app_package_name

Dart




dev_dependencies: 
  change_app_package_name: ^0.1.3


Step 2: Then save your file or run flutter pub get.

Step 3: Last step to run this command on your terminal with your new package name

Dart




flutter pub run change_app_package_name:main com.new.package.name


That’s it now your package name got changed everywhere with each and every platform.


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads