6. To change the app name in a Flutter project for Android, iOS, and web platforms, you’ll need to adjust settings in each platform’s configuration. Here’s how you can do it:
6.1. For Android:
- 6.1.1. Open the
android/app/src/main/AndroidManifest.xmlfile. - 6.1.2. Locate the
<application>tag. - 6.1.3. Change the value of the
android:labelattribute to your desired app name.
6.2. For iOS:
- 6.2.1. Open the
ios/Runner/Info.plistfile. - 6.2.2. Locate the
<key>CFBundleDisplayName</key>entry. - 6.2.3. Change the value associated with
<string>to your desired app name.
6.3. For Web:
- 6.3.1. Open the
web/index.htmlfile. - 6.3.2. Locate the
<key>title</key>tag. - 6.3.3. Change the text within the
<title>tag to your desired app name.
6.4. Additionally:
In your Flutter project directory, open the pubspec.yaml file and ensure that the name field is set to the desired app name. This is the name that appears in the app store listings, on the device’s home screen, etc.
After making these changes, rebuild your app for each platform to apply the new app name.
6.5. Example:
Let’s say you want to change the app name to “My New App”:
6.5.1. Android:
<application
android:label="My New App" ...>6.5.2. iOS:
<key>CFBundleDisplayName</key> <string>My New App</string>
6.5.3. Web:
<title>My New App</title>
6.5.4. Pubspec.yaml:
name: my_new_app
