flutter_launcher_icons 0.7.2

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 97

Build Status pub package

Flutter Launcher Icons #

A command-line tool which simplifies the task of updating your Flutter app's launcher icon. Fully flexible, allowing you to choose what platform you wish to update the launcher icon for and if you want, the option to keep your old launcher icon in case you want to revert back sometime in the future.

✨ What's New #

Version 0.7.2 (25th May 2019) #

  • Reverted back using old interpolation method

Version 0.7.1 (24th May 2019) #

  • Fixed issue with image dependency not working on latest version of Flutter (thanks to @sboutet06)
  • Fixed iOS icon sizes which were incorrect (thanks to @sestegra)
  • Removed dart_config git dependency and replaced with yaml dependency

Version 0.7.0 (22nd November 2018) #

  • Added check to ensure the Android file name is valid
  • Fixed issue where there was a git diff when there was no change
  • Fixed issue where iOS icon would be generated when it shouldn't be
  • Added support for drawables to be used for adaptive icon backgrounds
  • Added support for Flutter Launcher Icons to be able to run with it's own config file (no longer necessary to add to pubspec.yaml)

Version 0.6.1 (26th August 2018) #

  • Upgraded dependencies so that it should now work with Dart 2.1.0

Version 0.6.0 (8th August 2018) #

Version 0.5.0 (12th June 2018) #

  • [Android] Support for adaptive icons added

:book: Guide #

1. Setup the config file #

Add your Flutter Launcher Icons configuration to your pubspec.yaml or create a new config file called flutter_launcher_icons.yaml. An example is shown below. A more complex example can be found in the example project.

dev_dependencies: 
  flutter_launcher_icons: "^0.7.2"
  
flutter_icons:
  android: "launcher_icon" 
  ios: true
  image_path: "assets/icon/icon.png"

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

flutter pub get
flutter pub run flutter_launcher_icons:main -f <your config file name here>

Note: If you are not using the existing pubspec.yaml ensure that your config file is located in the same directory as it.

2. Run the package #

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

flutter pub get
flutter pub pub run flutter_launcher_icons:main

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 with the icon located in the image path specified above and given the name "launcher_icon" in the Android project and "Example-Icon" in the iOS project.

🔍 Attributes #

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

  • android/ios

    • 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 Flutter launcher icon.
  • 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)

Note: iOS icons should fill the entire image and not contain transparent borders.

The next two attributes are only used when generating Android launcher icon

  • adaptive_icon_background: The color (E.g. "#ffffff") or image asset (E.g. "assets/images/christmas-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

❓ Troubleshooting #

Listed a couple common issues with solutions for them

Generated icon color is different from the original icon #

Caused by an update to the image dependency which is used by Flutter Launcher Icons.

Use #AARRGGBB for colors instead of ##AABBGGRR, to be compatible with Flutter image class.

Related issue

Image foreground is too big / too small #

For best results try and use a foreground image which has padding much like the one in the example.

Related issue

👀 Example #

Video Example

Note: This is showing a very old version (v0.0.5)

Special thanks #

  • Thanks to Brendan Duncan for the underlying image package to transform the icons.
  • Big thank you to all the contributors to the project. Every PR / reported issue is greatly appreciated!

Changelog #

0.7.2 (25th May 2019) #

  • Reverted back using old interpolation method

0.7.1 (24th May 2019) #

  • Fixed issue with image dependency not working on latest version of Flutter (thanks to @sboutet06)
  • Fixed iOS icon sizes which were incorrect (thanks to @sestegra)
  • Removed dart_config git dependency and replaced with yaml dependency
  • Refactoring of code

0.7.0 (22nd November 2018) #

  • Now ensuring that the Android file name is valid - An error will be thrown if it doesn't meet the criteria
  • Fixed issue where there was a git diff when there was no change
  • Fixed issue where iOS icon would be generated when it shouldn't be
  • Added support for drawables to be used for adaptive icon backgrounds
  • Added support for Flutter Launcher Icons to be able to run with it's own config file (no longer necessary to add to pubspec.yaml)

0.6.1 (26th August 2018) #

  • Upgraded test package
  • Due to issue with dart_config not working with Dart 2.1.0, now using forked version of dart_config which contains fixes from both @v3rm0n and @SPodjasek

0.6.0 (8th August 2018) #

0.5.2 (19th June 2018) #

  • Previous release didn't fix adaptive icons, just prevented the error message from appearing. This should hopefully fix it!

0.5.1 (18th June 2018) #

  • Fix for adaptive icons

0.5.0 (12th June 2018) #

  • [Android] Support for adaptive icons added (Suggestion #23)

0.4.0 (9th June 2018) #

  • Now possible to generate icons for each platform with different image paths (one for iOS icon and a separate one for Android)

0.3.3 (28th May 2018) #

  • Upgraded dart image package dependency to 2.0.0 (issue #26)

0.3.2 (2nd May 2018) #

  • Bug fixing

0.3.1 (1st May 2018) #

  • Bug fixing

0.3.0 (1st May 2018) #

  • Fixed issue where icons produced weren't the correct size (Due to images not with a 1:1 aspect r ation)
  • Improved quality of smaller icons produced (Thanks to PR #17 - Thank you!)
  • Updated console printed messages to keep them consistent
  • Added example folder to GitHub project

0.2.1 (25th April 2018) #

  • Added extra iOS icon size (1024x1024)
  • Fixed iOS default icon name (Thanks to PR #15 - Thank you!)
  • Fixed issue #10 where creation of the icons was failing due to the target folder not existing

0.2.0 (18th January 2018) #

  • Ability to create new launcher icons without replacing the old ones added (#6)
  • Fixed issue with launcher icons for iOS not correctly being set

0.0.5 #

  • Quick Fix on if statement

0.0.4 #

  • Fixing strong mode error

0.0.3 #

  • Adding flutter as a dependency so its listed as a flutter package.

0.0.2 #

  • Fix Doc typo

0.0.1 #

  • Initial version, Resizes Icon to Android sizes only.

example/README.md

Flutter Launcher Icons Example Project #

This project has been setup so that you can test out the package before adding it to your own project. It is also a great way for contributors to the project can quickly test their changes to the project before they are published for everyone to download.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  flutter_launcher_icons: ^0.7.2

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:flutter_launcher_icons/android.dart';
import 'package:flutter_launcher_icons/constants.dart';
import 'package:flutter_launcher_icons/custom_exceptions.dart';
import 'package:flutter_launcher_icons/ios.dart';
import 'package:flutter_launcher_icons/main.dart';
import 'package:flutter_launcher_icons/xml_templates.dart';
  
Version Uploaded Documentation Archive
0.7.2 May 25, 2019 Go to the documentation of flutter_launcher_icons 0.7.2 Download flutter_launcher_icons 0.7.2 archive
0.7.1 May 23, 2019 Go to the documentation of flutter_launcher_icons 0.7.1 Download flutter_launcher_icons 0.7.1 archive
0.7.0 Nov 22, 2018 Go to the documentation of flutter_launcher_icons 0.7.0 Download flutter_launcher_icons 0.7.0 archive
0.6.1 Aug 26, 2018 Go to the documentation of flutter_launcher_icons 0.6.1 Download flutter_launcher_icons 0.6.1 archive
0.6.0 Aug 7, 2018 Go to the documentation of flutter_launcher_icons 0.6.0 Download flutter_launcher_icons 0.6.0 archive
0.5.2 Jun 19, 2018 Go to the documentation of flutter_launcher_icons 0.5.2 Download flutter_launcher_icons 0.5.2 archive
0.5.1 Jun 18, 2018 Go to the documentation of flutter_launcher_icons 0.5.1 Download flutter_launcher_icons 0.5.1 archive
0.5.0 Jun 12, 2018 Go to the documentation of flutter_launcher_icons 0.5.0 Download flutter_launcher_icons 0.5.0 archive
0.4.0 Jun 8, 2018 Go to the documentation of flutter_launcher_icons 0.4.0 Download flutter_launcher_icons 0.4.0 archive
0.3.3 May 28, 2018 Go to the documentation of flutter_launcher_icons 0.3.3 Download flutter_launcher_icons 0.3.3 archive

All 21 versions...

Popularity:
Describes how popular the package is relative to other packages. [more]
99
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
90
Overall:
Weighted score of the above. [more]
97
Learn more about scoring.

We analyzed this package on Jun 17, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.3.2
  • pana: 0.12.18

Platforms

Detected platforms: Flutter, other

Primary library: package:flutter_launcher_icons/main.dart with components: io.

Health suggestions

Fix lib/android.dart. (-0.50 points)

Analysis of lib/android.dart reported 1 hint:

line 265 col 3: Future results in async function bodies must be awaited or marked unawaited using package:pedantic.

Fix lib/ios.dart. (-0.50 points)

Analysis of lib/ios.dart reported 1 hint:

line 98 col 3: Future results in async function bodies must be awaited or marked unawaited using package:pedantic.

Format lib/main.dart.

Run dartfmt to format lib/main.dart.

Maintenance suggestions

The description is too long. (-10 points)

Search engines display only the first part of the description. Try to keep the value of the description field in your package's pubspec.yaml file between 60 and 180 characters.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.2.0 <3.0.0
args ^1.5.0 1.5.2
image ^2.1.1 2.1.4
yaml ^2.1.15 2.1.16
Transitive dependencies
archive 2.0.10
charcode 1.1.2
collection 1.14.11
convert 2.1.1
crypto 2.0.6
meta 1.1.7
path 1.6.2
petitparser 2.3.0
source_span 1.5.5
string_scanner 1.0.4
term_glyph 1.1.0
typed_data 1.1.6
xml 3.5.0
Dev dependencies
test ^1.6.3