How to change package name in flutter app - Khurram Softwares -->

Advertisement

How to change package name in flutter app

 


How to change package name in flutter app

To change the package name of a Flutter app, you will need to update the package value in the pubspec.yaml file and also update the AndroidManifest.xml file in the android/app folder.


  • Here are the steps to change the package name:
  • Open the pubspec.yaml file in the root of your Flutter project.
  • Change the value of the package field to the new package name. For example:

  • Open the android folder in your project, then open the app folder inside it.
  • Open the AndroidManifest.xml file and update the package attribute of the manifest element to the new package name. For example:

  • Update the package name in the main dart file,

  • Now run the flutter command flutter clean to clean the build folder and run the app again.
It's a good practice to always double-check the package name change to avoid any errors or conflicts.