Skip to content

Commit

Permalink
docs: data of generate config feature in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
OutdatedGuy authored and MarkOSullivan94 committed May 4, 2023
1 parent d6a4627 commit b827871
Showing 1 changed file with 32 additions and 10 deletions.
42 changes: 32 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,29 @@ A command-line tool which simplifies the task of updating your Flutter app's lau

### 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`.
Run the following command to create a new config automatically:

```shell
flutter pub run flutter_launcher_icons:generate
```

This will create a new file called `flutter_launcher_icons.yaml` in your `flutter` project's root directory.

If you want to override the default location or name of the config file, use the `-f` flag:

```shell
flutter pub run flutter_launcher_icons:generate -f <your config file name here>
```

To override an existing config file, use the `-o` flag:

```shell
flutter pub run flutter_launcher_icons:generate -o
```

OR

Add your Flutter Launcher Icons configuration to your `pubspec.yaml`.
An example is shown below. More complex examples [can be found in the example projects](https://github.com/fluttercommunity/flutter_launcher_icons/tree/master/example).

```yaml
Expand All @@ -36,25 +58,25 @@ flutter_launcher_icons:
image_path: "path/to/image.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. Run the package

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

```shell
flutter pub get
flutter pub run flutter_launcher_icons -f <your config file name here>
flutter pub run flutter_launcher_icons
```

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

```shell
flutter pub get
flutter pub run flutter_launcher_icons
flutter pub run flutter_launcher_icons -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.

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
Expand Down

0 comments on commit b827871

Please sign in to comment.