You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+32-10
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,29 @@ A command-line tool which simplifies the task of updating your Flutter app's lau
10
10
11
11
### 1. Setup the config file
12
12
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`.
14
36
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).
15
37
16
38
```yaml
@@ -36,25 +58,25 @@ flutter_launcher_icons:
36
58
image_path: "path/to/image.png"
37
59
```
38
60
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.
41
64
42
65
```shell
43
66
flutter pub get
44
-
flutter pub run flutter_launcher_icons -f <your config file name here>
67
+
flutter pub run flutter_launcher_icons
45
68
```
46
69
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.
52
72
53
73
```shell
54
74
flutter pub get
55
-
flutter pub run flutter_launcher_icons
75
+
flutter pub run flutter_launcher_icons -f <your config file name here>
56
76
```
57
77
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
+
58
80
If you encounter any issues [please report them here](https://github.com/fluttercommunity/flutter_launcher_icons/issues).
59
81
60
82
In the above configuration, the package is setup to replace the existing launcher icons in both the Android and iOS project
0 commit comments