[android] How can I change the app display name build with Flutter?

By default, when a flutter app gets installed, the app name on the launcher is your Flutter project name. To change that to your desired application name on Android or iOS both, you need to change AndroidManifest.xml and Info.plist respectively. here is a two way to achieve this

1 By plugin

You can use a flutter rename plugin. It helps you to change your flutter project's AppName and BundleId for different platforms, currently only available for iOS, Android and macOS

You can change the bundleId and appName in the following steps

Default Usage if you dont pass -t or --target parameter it will try to rename all available platform project folders inside flutter project.

Run this command inside your flutter project root.

pub global run rename --bundleId com.onatcipli.networkUpp
pub global run rename --appname "Test App Name"

Custom Usage if you want to run commands directly (without using pub global run) ensure you add system catche bin directory to your path

rename --appname yourappname -t ios

or

pub global run rename --appname yourappname --target macOS

To target a specific platform use the "--target" option. e.g.

pub global run rename --bundleId com.example.android.app --target android

2 By manual

For Android

App Name is reflected under Android>src>main>Androidmanifest.xml The label name in the Android manifest is responsible for giving the App Name for Android Application

Go to AndroidManifest.xml, find <application> tag. Change its android:label property with your desired app name.

Navigate to the : android/app/src/main/AndroidManifest.xml

enter image description here

The Androidmanifest.xml can now be modified. Choose the

<application
  android:name="io.flutter.app.FlutterApplication"
  android:label="YourAppName"
  android:icon="@mipmap/ic_launcher">

For Package Name

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="your.package.name">

This portion represents the actual Android file naming system. Important information like Launcher Icon and App name can be controlled here. Modify the android:label to change the App Name only.

For iOS

For iOS, open info.plist. Change CFBundleName (Bundle Name).

Go to the Xcode project folder and open Info.plist for edit (in Xcode you can choose Open As > Source Code in the file context menu). All we need is to edit the value for key CFBundleName. It’s a user-visible short name for the bundle.

Navigate to the: project/ios/Runner/Info.plist

enter image description here

Find the CFBundleName <key>. This denotes the Key that holds the app name. The app name now can be changed by modifying the <String> </String> below that.

<key>CFBundleName</key>
<string>YouAppName</string>

That’s it. By having these changes, That’s achieved, an updated application name in the launcher when an app gets installed on a device. your new app name will be displayed on your phone now.

Examples related to android

Under what circumstances can I call findViewById with an Options Menu / Action Bar item? How to implement a simple scenario the OO way My eclipse won't open, i download the bundle pack it keeps saying error log getting " (1) no such column: _id10 " error java doesn't run if structure inside of onclick listener Cannot retrieve string(s) from preferences (settings) strange error in my Animation Drawable how to put image in a bundle and pass it to another activity FragmentActivity to Fragment A failure occurred while executing com.android.build.gradle.internal.tasks

Examples related to ios

Adding a UISegmentedControl to UITableView Crop image to specified size and picture location Undefined Symbols error when integrating Apptentive iOS SDK via Cocoapods Keep placeholder text in UITextField on input in IOS Accessing AppDelegate from framework? Autoresize View When SubViews are Added Warp \ bend effect on a UIView? Speech input for visually impaired users without the need to tap the screen make UITableViewCell selectable only while editing Xcode 12, building for iOS Simulator, but linking in object file built for iOS, for architecture arm64

Examples related to flutter

Flutter Countdown Timer How to make an AlertDialog in Flutter? FlutterError: Unable to load asset Set the space between Elements in Row Flutter Flutter: RenderBox was not laid out Space between Column's children in Flutter How to change status bar color in Flutter? How can I add shadow to the widget in flutter? Flutter - The method was called on null Flutter- wrapping text

Examples related to dart

How to integrate Dart into a Rails app Flutter Countdown Timer How to make an AlertDialog in Flutter? Set the space between Elements in Row Flutter Flutter: RenderBox was not laid out Space between Column's children in Flutter How to change status bar color in Flutter? How can I add shadow to the widget in flutter? Flutter - The method was called on null Flutter- wrapping text

Examples related to build

error: This is probably not a problem with npm. There is likely additional logging output above Module not found: Error: Can't resolve 'core-js/es6' WARNING in budgets, maximum exceeded for initial How can I change the app display name build with Flutter? Error - Android resource linking failed (AAPT2 27.0.3 Daemon #0) Still getting warning : Configuration 'compile' is obsolete and has been replaced with 'implementation' Could not find com.android.tools.build:gradle:3.0.0-alpha1 in circle ci Error:Execution failed for task ':app:compileDebugKotlin'. > Compilation error. See log for more details Component is part of the declaration of 2 modules Maven build Compilation error : Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project Maven