Changing the Package Name

3. Changing the package name (also known as the bundle identifier or application ID) in a Flutter project involves a few steps:

3.1. Change the Android package name

  • Navigate to the android directory within your Flutter project.
  • Open the AndroidManifest.xml file located in app/src/main.
  • Find the package attribute in the <manifest> tag and change its
    value to your desired package name.

3.2. Change the iOS bundle identifier

  • Open ios/Runner.xcodeproj using Xcode.
  • Select the Runner project → Runner target → General tab.
  • Change the Bundle Identifier field to your desired bundle identifier.

3.3. Update Flutter project configuration

  • Open pubspec.yaml in the project root and update the name field.
  • Update the android: package field under flutter: with your new package name.

3.4. Update source code references

Update MainActivity.java/kt (Android) and AppDelegate.swift (iOS) references to the old package name, then clean and rebuild the project.