Skip to content

Commit

Permalink
Updated documentation (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkOSullivan94 authored Nov 22, 2018
1 parent 1df3106 commit 90ef7b0
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 40 deletions.
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
# Changelog

## 0.6.1(26th August 2018)
## 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)

- Moved the package to [Flutter Community](https://github.com/fluttercommunity/community)

## 0.5.2 (19th June 2018)
Expand Down
86 changes: 48 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,82 +9,92 @@ A command-line tool which simplifies the task of updating your Flutter app's lau

## :sparkles: 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 (thanks to @v3rm0n and @SPodjasek with the help with dart_config fixes)
* Upgraded dependencies so that it should now work with Dart 2.1.0

#### Version 0.6.0 (8th August 2018)
* Moved the package to [Flutter Community](https://github.com/fluttercommunity/community)

#### Version 0.5.0 (12th June 2018)
* [Android] Support for adaptive icons added (Thanks to PR #28 - Thank you!)

* [Android] Support for adaptive icons added

##### Version 0.4.0 (8th June 2018)
* Now possible to generate icons for each platform with different image paths - one for iOS icon and a separate one for Android (Thanks to PR #27 - Thank you!)

## :mag: Guide
## :book: Guide

1. Add dependency to your Flutter project's pubspec.yaml below any existing dependencies
#### 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](https://github.com/fluttercommunity/flutter_launcher_icons/blob/master/example/pubspec.yaml).
```yaml
dev_dependencies:
flutter_test:
sdk: flutter

flutter_launcher_icons: "^0.6.1"
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.

2. Within the same pubspec.yaml file, add flutter_icons config section.
```
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
Unlike your Flutter projects, you do not need to add your launcher icon images into the assets section of the pubspec.yaml.
After setting up the configuration, all that is left to do is run the package.
```
dev_dependencies:
flutter_test:
sdk: flutter

flutter_launcher_icons: "^0.6.1"

flutter_icons:
android: true
ios: "Example-Icon"
image_path: "assets/icon/icon.png"
image_path_android: "assets/icon/icon_android.png"
image_path_ios: "assets/icon/icon_ios.png"
adaptive_icon_background: "#FFFAFAFA"
adaptive_icon_foreground: "assets/icon/icon-foreground.png"
flutter packages get
flutter packages pub run flutter_launcher_icons:main
```
### Attributes:
If you encounter any issues [please report them here](https://github.com/fluttercommunity/flutter_launcher_icons/issues).
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.
## :mag: 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`: 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)
- Adaptive icons: The next two attributes are only necessary if you want to have an adaptive icon for the Android app of your Flutter project.
- `adaptive_icon_background`: The color 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
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.
3. Run the command to generate the icons
- `adaptive_icon_foreground`: The image asset which will be used for the icon foreground of the adaptive icon
```
flutter pub get
flutter packages pub run flutter_launcher_icons:main
```
## :eyes: Example
[![Video Example](https://img.youtube.com/vi/RjNAxwcP3Tc/0.jpg)](https://www.youtube.com/watch?v=RjNAxwcP3Tc)
Note: This is showing v0.0.5.
Note: This is showing a very old version (v0.0.5)
### Special thanks
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_launcher_icons
description: A package 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.
version: 0.6.1
version: 0.7.0
maintainer: Mark O'Sullivan (@MarkOSullivan94)
homepage: https://github.com/fluttercommunity/flutter_launcher_icons
authors:
Expand Down

0 comments on commit 90ef7b0

Please sign in to comment.