14

How to change the application name of the flutter project displayed on phone? I checked the file pubspec.yaml

name: flutter_app description: A new Flutter application. 

edited name's property, but the import package reference will also be changed, it's possible to change the application name only?

0

2 Answers 2

40

Android

Open AndroidManifest.xml file, make below changes

<application android:label="App Name" ...> // Your app name here 

iOS

Open info.plist file, make below changes

<key>CFBundleName</key> <string>App Name</string> // Your app name here 
Sign up to request clarification or add additional context in comments.

5 Comments

These are native methods to do that. I want to know flutter handles it from a single point or not?
@PankajBansal Do you mean you wanna change name dynamically?
@CopsOnRoad No I want to know is there any common place for iOS and android where I can give app name and icon because I know different for IOS(Plist) and Android(Manifest).
@PankajBansal I am sorry as of now there is no way, you need to do it in info.plist and AndroidManifest.xml.
For ios, updating the value of CFBundleName alone didn't work. I have to update CFBundleDisplayName value also. My app's flutter version is 2.10.3.
4

To change your application name , you need to change it for Android and IOS :

You can use rename package to make it easy .

Just run this command inside your flutter project root

pub global run rename --appname "My application" 

or

Edit AndroidManifest.xml for Android and info.plist for iOS

For Android, edit only android:label value in the application tag in file AndroidManifest.xml located in the folder: android/app/src/main

Code:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"> <application android:name="io.flutter.app.FlutterApplication" android:label="Your Application Name" //here android:icon="@mipmap/ic_launcher"> <activity> <!-- --> </activity> </application> </manifest> 

Screenshot:

Enter image description here

For iOS, edit only the value inside the String tag in file Info.plist located in the folder ios/Runner .

Code:

<plist version="1.0"> <dict> <key>CFBundleName</key> <string>Your Application Name </string> //here </dict> </plist> 

Screenshot:

Enter image description here

Do a flutter clean and restart your application if you have a problem.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.