How to Change the App Name, Package ID and Icon in a Flutter Project
Every template you buy ships with someone else's bundle id. Here is the complete list of files to touch on Android and iOS, and the two places people always forget.
Every template you buy on CodeCanyon ships with the author’s bundle id — something like com.devsnack.smartmoney. Before you can upload anything to the Play Console or App Store Connect, that has to become yours. Flutter spreads the value across four places, and two of them are easy to miss.
1. The display name
This is the label under the icon on the home screen. It is set per platform.
<application
android:label="Your App Name"
android:icon="@mipmap/ic_launcher"><key>CFBundleDisplayName</key>
<string>Your App Name</string>2. The package id on Android
The id lives in Gradle, but the Kotlin source directory has to move with it or the build fails at MainActivity.
android {
namespace = "com.yourcompany.yourapp"
defaultConfig {
applicationId = "com.yourcompany.yourapp"
}
}Then move android/app/src/main/kotlin/com/devsnack/smartmoney/MainActivity.kt into a folder matching the new id, and change the package line at the top of the file.
3. The bundle identifier on iOS
Open ios/Runner.xcworkspace in Xcode, select the Runner target, and set Bundle Identifier under Signing & Capabilities. Doing it here instead of by hand keeps the three build configurations — Debug, Release and Profile — in sync.
4. The icon
Generate every density with flutter_launcher_icons rather than replacing PNGs by hand.
flutter_launcher_icons:
android: "launcher_icon"
ios: true
image_path: "assets/icon/icon.png"
adaptive_icon_background: "#F7F4EE"
adaptive_icon_foreground: "assets/icon/foreground.png"dart run flutter_launcher_iconsThe two people forget
First, google-services.json and GoogleService-Info.plist are tied to the old package id. Register the new one in Firebase and download fresh files, or the app will build and then fail silently at sign-in. Second, deep links: any intent-filter host or associated-domain entry still points at the old identifier.
Run flutter clean before the first build. Stale Gradle caches are the reason a correct rename still throws a package mismatch.
Package ID Renamer
Free tool that lists every file above for your project, with the exact lines to change.