flutter_launcher_icons 0.7.0

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

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.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.0"
  
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 packages get
flutter packages 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 packages get
flutter packages 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)

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

👀 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 pics.
  • Big thank you to all the contributors to the project. Every PR / reported issue is greatly appreciated!

Changelog

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.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or flutter packages 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.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
0.3.2 May 2, 2018 Go to the documentation of flutter_launcher_icons 0.3.2 Download flutter_launcher_icons 0.3.2 archive
0.3.1 May 1, 2018 Go to the documentation of flutter_launcher_icons 0.3.1 Download flutter_launcher_icons 0.3.1 archive

All 19 versions...

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

We analyzed this package on Dec 5, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.7

Platforms

Detected platforms: Flutter, other

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

Health suggestions

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

Analysis of lib/main.dart reported 1 hint:

line 150 col 1: This function has a return type of 'bool', but doesn't end with a return statement.

Format lib/android.dart.

Run dartfmt to format lib/android.dart.

Format lib/constants.dart.

Run dartfmt to format lib/constants.dart.

Format lib/custom_exceptions.dart.

Run dartfmt to format lib/custom_exceptions.dart.

Format lib/xml_templates.dart.

Run dartfmt to format lib/xml_templates.dart.

Maintenance issues and suggestions

Use constrained dependencies. (-20 points)

The pubspec.yaml contains 1 dependency without version constraints. Specify version ranges for the following dependencies: dart_config.

The description is too long. (-10 points)

Search engines will display only the first part of the description. Try to keep it under 180 characters.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.49.0 <3.0.0
args ^1.5.0 1.5.1
dart_config 0.5.0
image ^2.0.0 2.0.5
Transitive dependencies
archive 2.0.4
charcode 1.1.2
collection 1.14.11
convert 2.0.2
crypto 2.0.6
meta 1.1.6
path 1.6.2
petitparser 2.0.2
source_span 1.4.1
string_scanner 1.0.4
typed_data 1.1.6
xml 3.2.3
yaml 2.1.15
Dev dependencies
test ^1.3.4