How to Add Launcher Icon to Your Flutter App

There is a library called Flutter Launcher Icons which has been developed to help developers quickly generate launcher icons for both Android and iOS.

You can get the latest version of the library on pub.dev. It is a command-line tool which updates your Flutter app’s launcher icon.

Following is the easiest way to change icon:

Setup the config file

In your pubspec.yaml, add flutter_launcher_icons and configurations.

dev_dependencies:
  flutter_test:
    sdk: flutter
  flutter_launcher_icons: ^0.7.3

flutter_icons:
  android: true
  ios: true
  image_path: "assets/icon/ic_launcher.png"

As you see, just set true to any platform which requires the icon and define its path.

Generate the icon

Open terminal and run these commands

flutter pub get
flutter pub pub run flutter_launcher_icons:main

Leave a Comment

Your email address will not be published. Required fields are marked *

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close