Skip to content

Commit b827871

Browse files
OutdatedGuyMarkOSullivan94
authored andcommitted
docs: data of generate config feature in readme
1 parent d6a4627 commit b827871

File tree

1 file changed

+32
-10
lines changed

1 file changed

+32
-10
lines changed

README.md

+32-10
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,29 @@ A command-line tool which simplifies the task of updating your Flutter app's lau
1010

1111
### 1. Setup the config file
1212

13-
Add your Flutter Launcher Icons configuration to your `pubspec.yaml` or create a new config file called `flutter_launcher_icons.yaml`.
13+
Run the following command to create a new config automatically:
14+
15+
```shell
16+
flutter pub run flutter_launcher_icons:generate
17+
```
18+
19+
This will create a new file called `flutter_launcher_icons.yaml` in your `flutter` project's root directory.
20+
21+
If you want to override the default location or name of the config file, use the `-f` flag:
22+
23+
```shell
24+
flutter pub run flutter_launcher_icons:generate -f <your config file name here>
25+
```
26+
27+
To override an existing config file, use the `-o` flag:
28+
29+
```shell
30+
flutter pub run flutter_launcher_icons:generate -o
31+
```
32+
33+
OR
34+
35+
Add your Flutter Launcher Icons configuration to your `pubspec.yaml`.
1436
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).
1537

1638
```yaml
@@ -36,25 +58,25 @@ flutter_launcher_icons:
3658
image_path: "path/to/image.png"
3759
```
3860
39-
If you name your configuration file something other than `flutter_launcher_icons.yaml` or `pubspec.yaml` you will need to specify
40-
the name of the file when running the package.
61+
### 2. Run the package
62+
63+
After setting up the configuration, all that is left to do is run the package.
4164
4265
```shell
4366
flutter pub get
44-
flutter pub run flutter_launcher_icons -f <your config file name here>
67+
flutter pub run flutter_launcher_icons
4568
```
4669

47-
Note: If you are not using the existing `pubspec.yaml` ensure that your config file is located in the same directory as it.
48-
49-
### 2. Run the package
50-
51-
After setting up the configuration, all that is left to do is run the package.
70+
If you name your configuration file something other than `flutter_launcher_icons.yaml` or `pubspec.yaml` you will need to specify
71+
the name of the file when running the package.
5272

5373
```shell
5474
flutter pub get
55-
flutter pub run flutter_launcher_icons
75+
flutter pub run flutter_launcher_icons -f <your config file name here>
5676
```
5777

78+
Note: If you are not using the existing `pubspec.yaml` ensure that your config file is located in the same directory as it.
79+
5880
If you encounter any issues [please report them here](https://github.com/fluttercommunity/flutter_launcher_icons/issues).
5981

6082
In the above configuration, the package is setup to replace the existing launcher icons in both the Android and iOS project

0 commit comments

Comments
 (0)