Icons Launcher - A command-line tool that simplifies the task of updating your Flutter app's launcher icon.

Overview

Icons Launcher

A command-line tool that simplifies the task of updating your Flutter app's launcher icon. Full flexibility allows you to only update the launcher icon for specific platforms as needed.


icons launcher preview

Platform Support

Android iOS MacOS Web Linux Windows
✔️ ✔️ ✔️ ✔️ ✔️ ✔️

Guide

1. Setup the config file

Add your Icons Launcher configuration to your pubspec.yaml or create a new config file called icons_launcher.yaml.

An example is shown below. More complex examples here.

Method 1: use with pubspec.yaml

dev_dependencies:
  icons_launcher: ^1.1.9

flutter_icons:
  image_path: 'assets/ic_logo_border.png'
  ios: true
  android: true

Method 2: create icons_launcher.yaml at project root

flutter_icons:
  image_path: 'assets/ic_logo_border.png'
  ios: true
  android: true

2. Run the package

After setting up the configuration, all that is left to do is run the package:

flutter pub get
flutter pub run icons_launcher:create

If you name your configuration file something other than icons_launcher.yaml or pubspec.yaml you will need to specify the name of the file when running the package.

flutter pub get
flutter pub run icons_launcher:create -f <your config file name here>

NOTE: If you are not using the existing pubspec.yaml your config file must still be located in the same directory as it.

If you encounter any issues please report them here.

In the above configuration, the package is setup to replace the existing launcher icons in both the Android and iOS project.


Attributes

Shown below is the full list of attributes which you can specify within your Icons Launcher configuration.

  • android/ios/web/macos/windows/linux

    • true: Override the default existing Flutter launcher icon for the platform specified
    • false: Ignore making launcher icons for this platform
    • icon/path/here.png: This will generate a new launcher icons for the platform with the name you specify, without removing the old default existing icon launcher.
  • image_path: The location of the icon image file which you want to use as the app launcher icon

  • image_path_android: The location of the icon image file specific for Android platform (optional - if not defined then the image_path is used)

  • image_path_ios: The location of the icon image file specific for iOS platform (optional - if not defined then the image_path is used)

  • image_path_macos: The location of the icon image file specific for MacOS platform (optional - if not defined then the image_path is used)

  • image_path_windows: The location of the icon image file specific for Windows platform (optional - if not defined then the image_path is used)

  • image_path_linux: The location of the icon image file specific for Linux platform (optional - if not defined then the image_path is used)

  • image_path_web: The location of the icon image file specific for Web platform (optional - if not defined then the image_path is used)

The next three attributes are only used when generating Android adaptive launcher icon (Read more)

  • adaptive_icon_background: The color (E.g. "#ffffff") or image asset (E.g. "assets/ic_background.png") which will be used to fill out the background of the adaptive icon.

  • adaptive_icon_foreground: The image asset which will be used for the icon foreground of the adaptive icon

  • adaptive_icon_round: The image asset which will be used for the round icon of the adaptive icon (optional)

Note:

  • Android adaptive icon will generate if you provide adaptive_icon_background and adaptive_icon_foreground.
  • adaptive_icon_round is optional, if you provide you must provide two config above also, the plugin will modify your AndroidMainifest.xml to add android:roundIcon="@mipmap/ic_launcher_round and create a new file ic_launcher_round.xml to mipmap-anydpi-v26
  • iOS icons should fill the entire image and not contain transparent borders.

Flavor support

Create a Icons Launcher configuration file for your flavor. The config file is called icons_launcher-.yaml by replacing by the name of your desired flavor.

The configuration file format is the same.


Example

Use in pubspec.yaml

dev_dependencies:
  icons_launcher: ^1.1.9

flutter_icons:
  # image_path: 'assets/ic_logo_border.png'
  image_path_android: 'assets/ic_logo_border.png'
  image_path_ios: 'assets/ic_logo_rectangle.png'
  image_path_macos: 'assets/ic_logo_border.png'
  image_path_windows: 'assets/ic_logo_border.png'
  image_path_linux: 'assets/ic_logo_border.png'
  image_path_web: 'assets/ic_logo_border.png'
  adaptive_icon_background: 'assets/ic_background.png'
  adaptive_icon_foreground: 'assets/ic_foreground.png' 
  adaptive_icon_round: 'assets/ic_logo_round.png' #! (Optional)
  remove_alpha_ios: false
  remove_alpha_macos: false
  ios: true
  android: true
  macos: false
  windows: false
  linux: false
  web: false

Or use in custom yaml (icons_launcher.yaml)

flutter_icons:
  # image_path: 'assets/ic_logo_border.png'
  image_path_android: 'assets/ic_logo_border.png'
  image_path_ios: 'assets/ic_logo_rectangle.png'
  image_path_macos: 'assets/ic_logo_border.png'
  image_path_windows: 'assets/ic_logo_border.png'
  image_path_linux: 'assets/ic_logo_border.png'
  image_path_web: 'assets/ic_logo_border.png'
  adaptive_icon_background: 'assets/ic_background.png'
  adaptive_icon_foreground: 'assets/ic_foreground.png' 
  adaptive_icon_round: 'assets/ic_logo_round.png' #! (Optional)
  remove_alpha_ios: false
  remove_alpha_macos: false
  ios: true
  android: true
  macos: false
  windows: false
  linux: false
  web: false

This package is forked from flutter_launcher_icons which includes bugs fixed & adds more platform support.

Comments
  • [BUG] Debug build fails when using adaptive icon foreground

    [BUG] Debug build fails when using adaptive icon foreground

    :information_source: Info

    Version: >=1.1.4

    :speech_balloon: Description

    Debug build fails:

    FAILURE: Build failed with an exception.

    • What went wrong: Execution failed for task ':app:processDebugResources'.

    A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade Android resource linking failed \app\android\app\src\main\res\mipmap-anydpi-v26\ic_launcher.xml:4: AAPT: error: resource drawable/ic_launcher_foreground (aka com.example.app:drawable/ic_launcher_foreground) not found.

    :scroll: Pubspec.yaml

    name: <stripped>
    description: <stripped>
    
    version: 1.0.0+1
    
    environment:
      sdk: ">=2.16.1 <3.0.0"
    
    dependencies:
      flutter:
        sdk: flutter
    
      cupertino_icons: ^1.0.2
      flutter_native_splash: ^2.1.1
      vrouter: ^1.2.0+21
      google_fonts: ^2.3.2
    
    dev_dependencies:
      flutter_app_name: ^0.1.1
      icons_launcher: "^1.1.4"
      flutter_test:
        sdk: flutter
    
      flutter_lints: ^1.0.0
    
    flutter_icons:
      android: true
      ios: true
      image_path: "assets/logo-bg.png"
      adaptive_icon_background: "#242424"
      adaptive_icon_foreground: "assets/logo.png"
    
    flutter_native_splash:
      background_image: "assets/splashscreen_background.png"
      image: "assets/logo.png"
    
    flutter_app_name:
      name: <stripped>
    
    # The following section is specific to Flutter.
    flutter:
      uses-material-design: true
    
      assets:
        - assets/
    
    opened by whygee-dev 10
  • [FEATURE REQUEST] multiple windows icons

    [FEATURE REQUEST] multiple windows icons

    :speech_balloon: Description

    To get the best resolution on multiple windows explorer views (large icons, list, ...), is it possible to generate a windows .ico with multiple resolutions of the input icon file? Also the highest resolution of 256px would be nice.

    See https://stackoverflow.com/questions/3236115/which-icon-sizes-should-my-windows-applications-icon-include

    :question: Platform

    Windows

    opened by matthias-steinkamp 7
  • [BUG] Windows icon generation error

    [BUG] Windows icon generation error

    :information_source: Info

    Latest version: 1.1.7

    :speech_balloon: Description

    The following error is returned:

    FileSystemException: Cannot open file, path = 'windows/Runner/resources/app_icon.ico' (OS Error: No such file or directory, errno = 2)
    

    On my system (linux), the correct path would be windows/runner/.....

    :scroll: Pubspec.yaml

    dev_dependencies: icons_launcher: ^1.1.7

    flutter_icons: image_path: 'assets/icons/my.png' adaptive_icon_round: 'assets/icons/my.png' adaptive_icon_background: 'assets/icons/my.png' adaptive_icon_foreground: 'assets/icons/my.png' remove_alpha_ios: true remove_alpha_macos: true ios: true android: true macos: true windows: true linux: true web: true

    opened by yaymalaga 4
  • [BUG] Problem when try to add package

    [BUG] Problem when try to add package

    :information_source: Info

    Version: 2.0.6

    Flutter version: 3.3.9

    :speech_balloon: Description

    When add the package I get this error: Because icons_launcher >=1.1.0 depends on universal_io ^2.0.4 which depends on crypto ^3.0.0, icons_launcher >=1.1.0 requires crypto ^3.0.0. So, because crypto depends on icons_launcher ^2.0.6 and crypto is 1.0.0+1, version solving failed. pub get failed (1; So, because crypto depends on icons_launcher ^2.0.6 and crypto is 1.0.0+1, version solving failed.)

    opened by rupas385 3
  • [BUG] snap/gui/app_icon.desktop replaced on icons_launcher:create.

    [BUG] snap/gui/app_icon.desktop replaced on icons_launcher:create.

    :information_source: Info

    v2.0.5

    :speech_balloon: Description

    When running flutter pub run icons_launcher:create, the file snap/gui/app_icon.desktop is overwritten by an example file. For example, I have changed Name and Comment in the file and this is replaced by the default values:

    Name=Flutter Linux App
    Comment=Flutter Linux launcher icon
    

    :scroll: Pubspec.yaml

    icons_launcher.yaml as follows:

    icons_launcher:
      image_path: "assets/icons/logo.png"
      platforms:
        android:
          enable: true
        ios:
          enable: false
        linux:
          enable: true
        macos:
          enable: false
        web:
          enable: true
        windows:
          enable: true
    
    opened by fredrikbaberg 3
  • I'm running into this error, I don't know what it could be

    I'm running into this error, I don't know what it could be

    :information_source: Info

    Version: `icons_launcher: ^2.0.0

    :speech_balloon: Description

    Unhandled exception:

    type 'Null' is not a subtype of type 'Map<String, dynamic>' in type cast
    #0      hasPlatformConfig (package:icons_launcher/utils/utils.dart:4:41)
    #1      _checkConfig (package:icons_launcher/cli_commands.dart:85:8)
    #2      createLauncherIcons (package:icons_launcher/cli_commands.dart:28:3)
    #3      main (file:///Users/manuel/.pub-cache/hosted/pub.dartlang.org/icons_launcher-2.0.0/bin/create.dart:15:3)
    #4      _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:295:32)
    #5      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:192:12)
    pub finished with exit code 255
    

    :scroll: Pubspec.yaml

    icons_launcher:
      ios: true
      android: true
      remove_alpha_ios: true
      image_path_ios: 'assets/icon/logo.png'
      image_path_android: 'assets/icon/logo.png'
      # https://github.com/fluttercommunity/flutter_launcher_icons/issues/144
      adaptive_background_image: 'assets/icon/app-icon-background.png'
      adaptive_foreground_image: 'assets/icon/app-icon-foreground.png'
    
    opened by manuelduarte077 3
  • android icons size issue [BUG]

    android icons size issue [BUG]

    :information_source: Info

    Version: 1.2.1

    :speech_balloon: Description

    android output launcher icon size is not fitted can you help me to fix this issue?

    :scroll: Pubspec.yaml

    flutter_icons: windows: true macos: false linux: false android: true ios: false web: true image_path_windows: "assets\images\logo\oldMinimalLogo.png" image_path_macos: "assets\images\logo\oldMinimalLogo.png" image_path_linux: "assets\images\logo\oldMinimalLogo.png" image_path_android: "assets\images\logo\oldMinimalLogo.png" image_path_ios: "assets\images\logo\oldMinimalLogo.png" image_path_web: "assets\images\logo\oldMinimalLogo.png" adaptive_icon_background: "#028A99" adaptive_icon_foreground: "assets\images\logo\oldMinimalLogo.png" remove_alpha_ios: false remove_alpha_macos: false

    oldMinimalLogo

    screeshot

    opened by Ali-Fadaei 3
  • [BUG] Icons don't update on macOS desktop

    [BUG] Icons don't update on macOS desktop

    :information_source: Info

    Version: icons_launcher: ^1.1.3

    :speech_balloon: Description

    When run from the CLI it seems to generate the icons, but when the app starts the icon in the desktop tray is still the default Flutter icon. Note: This actually happens also when I manually change the icons using Xcode. If the app (Runner) is started in Xcode the icons show up. If it is started from the CLI: flutter run -d macos the default flutter icon shows up.

    Thus, I'm not sure it's a plugin problem, but maybe there is a workaround?

    :scroll: icons_launcher.yaml

    flutter_icons: android: false ios: false macos: true image_path: "assets/icon/icon.png" remove_alpha_macos: true

    opened by danfleck 3
  • [BUG] cannot create launcher icons on web

    [BUG] cannot create launcher icons on web

    I'm trying to create a favicon for the web version and I'm getting the following error:

    $ flutter pub run icons_launcher:create --path icons_launcher.yaml
    
    
    ╔════════════════════════════════════════════════════╗
    ║             ✨✨  ICONS LAUNCHER  ✨✨             ║
    ╠════════════════════════════════════════════════════╣
    ║                   Version: 2.0.3                   ║
    ╚════════════════════════════════════════════════════╝
    
    
    Unhandled exception:
    NoSuchMethodError: The method 'containsKey' was called on null.
    Receiver: null
    Tried calling: containsKey("adaptive_background_color")
    #0      Object.noSuchMethod (dart:core-patch/object_patch.dart:38:5)
    #1      _createIconsByConfig (package:icons_launcher/cli_commands.dart:332:28)
    #2      createLauncherIcons (package:icons_launcher/cli_commands.dart:29:3)
    #3      main (file:///C:/Users/user/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/icons_launcher-2.0.3/bin/create.dart:15:3)
    #4      _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:295:32)
    #5      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:192:12)
    pub finished with exit code 255
    

    This is my config file:

    $ cat icons_launcher.yaml
    # flutter pub run icons_launcher:create
    
    icons_launcher:
      image_path: 'assets/images/favicon.png'
      platforms:
        web:
          enable: true
          image_path: 'assets/images/favicon.png'
          favicon_path: 'assets/images/favicon.png'
    

    flutter doctor

    Doctor summary (to see all details, run flutter doctor -v):
    [√] Flutter (Channel master, 3.1.0-0.0.pre.2294, on Microsoft Windows [Version 10.0.17763.2237], locale en-UA)
    [√] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc4)
    [√] Chrome - develop for the web
    [√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.1.4)
    [√] Android Studio (version 4.2)
    [√] Connected device (2 available)
    [√] HTTP Host Availability
    
    • No issues found!
    
    opened by piratkin 2
  • [BUG] mipmap/ic_launcher_round not found

    [BUG] mipmap/ic_launcher_round not found

    :information_source: Info

    Version: v1.1.17

    :speech_balloon: Description

    I have my pubspec.yaml like the following for this package:

    :scroll: Pubspec.yaml

    # Depends on `icons_launcher`
    flutter_icons:
      ios: true
      android: true
      # iOS requires entire image
      image_path: "assets/launcher/icon_square.png"
      # Otherwise, Android don't
      adaptive_icon_round: "assets/launcher/icon_rounded.png"
      adaptive_icon_background: "#FFA500"
    

    When I run all goes well

    ➜ flutter pub run icons_launcher:main

    But when I run into the devices I only keep getting the following error:

    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Execution failed for task ':app:processDebugResources'.
    > A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction
       > Android resource linking failed
         ERROR:E:\Development\Com\App\build\app\intermediates\packaged_manifests\debug\AndroidManifest.xml:17: AAPT: error: resource mipmap/ic_launcher_round (aka com.app:mipmap/ic_launcher_round) not found.
    
    
    * Try:
    > Run with --stacktrace option to get the stack trace.
    > Run with --info or --debug option to get more log output.
    
    opened by schuberty 2
  • [BUG] Android adaptive icon not displaying properly

    [BUG] Android adaptive icon not displaying properly

    :information_source: Info

    Version: ^1.1.3

    :speech_balloon: Description

    The android adaptive icon is not displaying properly. See the screenshot below. The "default_e..." entry is from the example project in this repo and the "mobile" entry is from my personal project which has a solid white png for the background image and a black icon centered over transparency for the foreground image.

    Screenshot_1651746531

    Flutter version info:

     Flutter version 2.10.5
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision 5464c5bac7 (2 weeks ago), 2022-04-18 09:55:37 -0700
        • Engine revision 57d3bac3dd
        • Dart version 2.16.2
        • DevTools version 2.9.2
    

    Android info:

    Android toolchain - develop for Android devices (Android SDK version 31.0.0)
        • Platform android-31, build-tools 31.0.0
        • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)
        • All Android licenses accepted.
    
    Android Studio (version 2021.1)
        • Flutter plugin version 66.0.1
        • Dart plugin version 211.7811
        • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)
    
    Connected device
        • sdk gphone64 x86 64 (mobile) • emulator-5554 • android-x64    • Android 12 (API 31) (emulator)
    

    The screenshot is from a Pixel 4 API 31 emulator but is also reproducible on a physical device.

    :scroll: Pubspec.yaml

    Copied from the example project in this repo:

    name: example
    description: A new Flutter project to quickly test flutter_launcher_icons.
    
    version: 1.0.0+1
    
    environment:
      sdk: ">=2.12.0 <3.0.0"
    
    dependencies:
      flutter:
        sdk: flutter
      cupertino_icons: ^1.0.4
    
    dev_dependencies:
      flutter_test:
        sdk: flutter
      icons_launcher:
        path: ../
    
    flutter:
    
      uses-material-design: true
    
    opened by agramian 2
  • Android launcher icon scaling

    Android launcher icon scaling

    I'd like to create icons for all platform from only one image resource. This is currently not possible because Android icon looks larger. I'd suggest adding some scaling factor to Android image, like suggested here https://github.com/fluttercommunity/flutter_launcher_icons/pull/181

    opened by avalanche-tm 0
Releases(v2.0.7)
Owner
Mrr Hak
Life is wonderful when things work.
Mrr Hak
The Material Design Icons Icon pack available as set of Flutter Icons.

material_design_icons_flutter The Material Design Icons Icon pack available as set of Flutter Icons. Based on Material Design Icons 6.5.95. See a web

ziofat 147 Oct 26, 2022
The Line Awesome Icon pack available as Flutter Icons

line_awesome_icons The Line Awesome Icon pack available as Flutter Icons Getting Started This plugin is based on Line Awesome Icons pack, which you ca

Châu Minh Phúc 25 Oct 10, 2022
shared_versions is a command line tool that allow share the versions for multiple packages in Flutter

shared_versions shared_versions is a CLI tool that allow share the versions for multiple packages in Flutter. Usage shared_versions will match the pac

Littlegnal 6 Sep 20, 2022
This is a simple Gantt chart generator written as Dart command line tool.

Gantt Chart Generator This is a simple Gantt chart generator written as Dart command line tool. Currently the tool generates an HTML/CSS Gantt chart.

John Lyon-Smith 1 Apr 26, 2022
The COCO icon pack with - +600 Editable icons available for your flutter project.

cocoicons The COCO icon pack with - +600 Editable icons available for your flutter project. Made from COCO icon pack. ?? Installation In the dependenc

Samuel Abada 5 Sep 23, 2022
The Font Awesome Icon pack available as Flutter Icons

font_awesome_flutter The Font Awesome Icon pack available as set of Flutter Icons. Based on Font Awesome 5.15.4. Includes all free icons: Regular Soli

Flutter Community 731 Dec 28, 2022
Package your Flutter app into OS-specific bundles (.dmg, .exe, etc.) via Dart or the command line.

flutter_distributor Package your Flutter app into OS-specific bundles (.dmg, .exe, etc.) via Dart or the command line. The flutter_distributor source

LeanFlutter 416 Dec 24, 2022
Flutter plugin to implement a Boom Menu, with icons, title, subtitle, animated FAB Icons and hide on scrolling.

Flutter Boom Menu Usage The BoomMenu widget is built to be placed in the Scaffold.floatingActionButton argument, replacing the FloatingActionButton wi

Mohanraj 88 Aug 1, 2022
Fluent System Icons are a collection of familiar, friendly and modern icons from Microsoft.

Fluent UI System Icons Fluent UI System Icons are a collection of familiar, friendly and modern icons from Microsoft. Icon List View the full list of

Microsoft 4.3k Dec 29, 2022
Screenshots - A command line utility and package for capturing screenshots for Flutter

A screenshot image with overlaid status bar placed in a device frame. For an example of images generated with Screenshots on a live app in both stores

Maurice McCabe 258 Nov 22, 2022
An incredible command line interface for Flutter.

Fast CLI An incredible command line interface for Flutter. It allows you to create your own CLI without coding a line. With this CLI, you can create y

Pedro Bissonho 41 Jul 12, 2022
This is a command-line app written on dart language for flutter applications that will help you to generate some boilerplate code

dart-generator Manual installation: 1- generate a platform executable from code dart compile exe main.dart -o generator this will generate a new gene

One Studio 11 Oct 26, 2022
Scaff is a simple command-line utility for generating Dart and Flutter components from template files.

Introduction Scaffold Generator for Dart and Flutter. scaff is a simple command-line utility for generating Dart and Flutter components from template

Ganesh Rathinavel Medayil 29 Jul 17, 2022
Listen to remote Flutter GTK application instances' command-line arguments and file open requests.

gtk_application This package allows the primary Flutter GTK application instance to listen to remote application instances' command-line arguments and

null 12 Dec 15, 2022
A command-line application provide an load optimization solution for flutter web

一个命令行工具,针对flutter web加载慢和缓存问题提供了一套解决方案。 功能 通过大文件分片和资源文件cdn化方式,优化flutter web页面加载慢问题。 通过资源文件hash化,解决浏览器强缓存导致功能无法更新问题。 开始 局部安装 dev_dependencies: flutte

Barry 10 Dec 29, 2022
Command Line Interface (CLI) for Lucifer

Lucy Command Line Interface (CLI) for Lucifer. Installation Activate command line from your terminal with this command. pub global activate lucy Usage

Salman S 1 Dec 16, 2021
A Nerolab Command Line Interface for Dart created by Nerolab

Nerolab CLI Nerolab Command Line Interface for Dart. Special thanks to GroovinChip with groovin_cli and very_good_cli. Installing dart pub global acti

Nerolab 1 Jan 19, 2022
changelog.dart provides a library and a command-line application to manage in the correct way the git metadata to build the changelog between two release

changelog.dart ?? changelog.dart: a collection of tools to manages in a fashion way a repository as maintainer. ?? Project Homepage Table of Content I

Vincenzo Palazzo 7 Dec 18, 2022
☄ Anime/Manga command-line interface backed up by Tenka.

Yukimi ☄ Anime/Manga command-line interface backed up by Tenka. By using this project, you agree to the usage policy. Installation Pre-built binaries

Yukino Org 28 Jan 6, 2023