icons_launcher 2.0.0-beta.1 icon indicating copy to clipboard operation
icons_launcher: ^2.0.0-beta.1 copied to clipboard

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

✨ 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 #

AndroidiOSMacOSWebLinuxWindows
✔️✔️✔️✔️✔️✔️

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: ^2.0.0-beta.1

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

Method 2: create icons_launcher.yaml at project root

icons_launcher:
  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 --path <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.

OptionTypeDefaultDescription
androidBooleanfalseOverride the default existing of android
iosBooleanfalseOverride the default existing of ios
webBooleanfalseOverride the default existing of web
macosBooleanfalseOverride the default existing of macos
windowsBooleanfalseOverride the default existing of windows
linuxBooleanfalseOverride the default existing of linux
image_pathStringnullThe image file path which you want to use as the app launcher icon
image_path_androidStringnullThe image file path specific for Android platform (optional - if not defined then the image_path is used)
image_path_iosStringnullThe image file path specific for iOS platform (optional - if not defined then the image_path is used)
image_path_webStringnullThe image file path specific for Web platform (optional - if not defined then the image_path is used)
image_path_macosStringnullThe image file path specific for macOS platform (optional - if not defined then the image_path is used)
image_path_windowsStringnullThe image file path specific for Windows platform (optional - if not defined then the image_path is used)
image_path_linuxStringnullThe image file path specific for Linux platform (optional - if not defined then the image_path is used)
color_adaptive_backgroundStringnullThe color (E.g. "#ffffff") used to fill out the background of the adaptive icon
image_adaptive_backgroundStringnullThe image asset (E.g. "assets/ic_background.png") used to fill out the background of the adaptive icon
image_adaptive_foregroundStringnullThe image asset used for the icon foreground of the adaptive icon
image_adaptive_roundStringnullThe image asset used for the round icon of the adaptive icon (optional)

Note: #

  • Android adaptive icon will generate if you provide image_adaptive_background or color_adaptive_background and image_adaptive_foreground.
  • image_adaptive_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 tomipmap-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-<flavor>.yaml by replacing <flavor> by the name of your desired flavor.

Example: icons_launcher-dev.yaml

Run with flavor:

flutter pub get
flutter pub run icons_launcher:create --flavor dev

The configuration file format is the same.


Example #

Use in pubspec.yaml #

dev_dependencies:
  icons_launcher: ^2.0.0-beta.1

icons_launcher:
  # 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'
  image_adaptive_background: 'assets/ic_background.png'
  image_adaptive_foreground: 'assets/ic_foreground.png' 
  image_adaptive_round: 'assets/ic_logo_round.png' #! (Optional)
  ios: true
  android: true
  macos: false
  windows: false
  linux: false
  web: false

Or use in custom yaml (icons_launcher.yaml) #

icons_launcher:
  # 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'
  image_adaptive_background: 'assets/ic_background.png'
  image_adaptive_foreground: 'assets/ic_foreground.png' 
  image_adaptive_round: 'assets/ic_logo_round.png' #! (Optional)
  ios: true
  android: true
  macos: false
  windows: false
  linux: false
  web: false
206
likes
120
pub points
94%
popularity

Publisher

verified publisher iconmrrhak.com

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

Homepage
Repository (GitHub)

Documentation

API reference

License

Icon for licenses.MIT (LICENSE)

Dependencies

args, image, path, universal_io, yaml

More

Packages that depend on icons_launcher