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

Cover Image for How can I change the app display name build with Flutter?
Matheus Mello
Matheus Mello
published a few days ago. updated a few hours ago

How to Change the App Display Name in Flutter? 📱✨

So, you've built a shiny new app with Flutter, but now you want to give it a personalized touch by changing its display name. You've tried tinkering with the AndroidManifest.xml file, but it didn't quite do the trick. Don't worry, I've got your back! In this blog post, I'll show you how to easily change the app display name in Flutter, without any hassle. Let's dive right in! 🏊‍♂️🚀

The Manifest.xml Approach 📝📱

Changing the app display name via the AndroidManifest.xml file works for native Android apps, but in Flutter, it requires a bit of extra work. Don't fret, it's still an option if you prefer to go this route. Here's how you can do it:

  1. Open your Flutter project and navigate to the android/app/src/main directory.

  2. Locate the AndroidManifest.xml file and open it with your favorite code editor.

  3. In the <application> tag, find the android:label attribute and change its value to your desired display name. For example:

<application
  ...
  android:label="My Trips Tracker"
  ...
>
  1. Save the changes and rebuild your Flutter app. The new display name should now be reflected when you launch the app.

The Flutter Way using Flutter Launcher Icons Package 🚀🚀

While the AndroidManifest.xml method works, Flutter provides a more convenient way to change the app display name by using the Flutter Launcher Icons package. This package allows you to customize various app icons and provides an easy way to update your app's display name as well. Let's see how to do it:

  1. Ensure that you have the Flutter Launcher Icons package added to your pubspec.yaml file. If not, add the following line under the dev_dependencies section:

dev_dependencies:
  flutter_launcher_icons: ^0.9.2
  1. Save the file, and run flutter pub get in your terminal to fetch the package.

  2. Next, create a new configuration file named flutter_launcher_icons.yaml in the root of your Flutter project.

  3. Open the configuration file and add the following lines:

flutter_icons:
  android: true
  ios: false
  image_path: "assets/images/app_icon.png" # your app icon path
  name: "My Trips Tracker" # your desired display name

Ensure that you replace "assets/images/app_icon.png" with the path to your app's icon.

  1. Save the configuration file and run flutter pub run flutter_launcher_icons:main in your terminal.

  2. Wait for the process to finish, and voila! Your app's display name should now be updated to "My Trips Tracker".

Wrapping Up 🎁✅

Changing the app display name in Flutter might seem daunting at first, especially if you're used to the traditional Android approach. However, with the Manifest.xml method or by utilizing the Flutter Launcher Icons package, you can easily give your app a unique identity. So go ahead, personalize your app, and make it stand out in the crowd! 🎉🚀

I hope this guide was helpful to you! If you have any questions or encounter any issues along the way, feel free to drop a comment below. Also, let me know if you found any other cool ways to change the app display name in Flutter. Happy coding, and have a fantastic time building awesome apps! 💻📱😊


More Stories

Cover Image for How can I echo a newline in a batch file?

How can I echo a newline in a batch file?

updated a few hours ago
batch-filenewlinewindows

🔥 💻 🆒 Title: "Getting a Fresh Start: How to Echo a Newline in a Batch File" Introduction: Hey there, tech enthusiasts! Have you ever found yourself in a sticky situation with your batch file output? We've got your back! In this exciting blog post, we

Matheus Mello
Matheus Mello
Cover Image for How do I run Redis on Windows?

How do I run Redis on Windows?

updated a few hours ago
rediswindows

# Running Redis on Windows: Easy Solutions for Redis Enthusiasts! 🚀 Redis is a powerful and popular in-memory data structure store that offers blazing-fast performance and versatility. However, if you're a Windows user, you might have stumbled upon the c

Matheus Mello
Matheus Mello
Cover Image for Best way to strip punctuation from a string

Best way to strip punctuation from a string

updated a few hours ago
punctuationpythonstring

# The Art of Stripping Punctuation: Simplifying Your Strings 💥✂️ Are you tired of dealing with pesky punctuation marks that cause chaos in your strings? Have no fear, for we have a solution that will strip those buggers away and leave your texts clean an

Matheus Mello
Matheus Mello
Cover Image for Purge or recreate a Ruby on Rails database

Purge or recreate a Ruby on Rails database

updated a few hours ago
rakeruby-on-railsruby-on-rails-3

# Purge or Recreate a Ruby on Rails Database: A Simple Guide 🚀 So, you have a Ruby on Rails database that's full of data, and you're now considering deleting everything and starting from scratch. Should you purge the database or recreate it? 🤔 Well, my

Matheus Mello
Matheus Mello