Skip to content

Commit 6a7c8d4

Browse files
authored
Merge pull request #23 from FlutterFlow/feature/add-app-launcher-icon
Add app launcher icon docs
2 parents 5ce50f2 + 865ec81 commit 6a7c8d4

File tree

4 files changed

+177
-5
lines changed

4 files changed

+177
-5
lines changed

docs/test-and-publish/publish/apple-app-store-deployment.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@ keywords: [Apple App Store, Deployment, Dreamflow, iOS]
1313
Dreamflow allows you to deploy your apps directly to the Apple App Store from within the platform. This guide covers all the necessary prerequisites, a step-by-step deployment process, and common troubleshooting tips.
1414

1515
:::info[Prerequisites]
16-
16+
- Ensure you have [**set an app launcher icon**](pre-checks-publishing.md#add-app-launcher-icon).
1717
- Create an [**Apple account**](https://appleid.apple.com/account?appId=632&returnUrl=https%3A//developer.apple.com/account/).
1818
- [**Purchase an Apple Developer membership**](https://developer.apple.com/programs/enroll/). Learn more about the program and enrollment process [**here**](https://developer.apple.com/programs/).
19-
- Ensure you have set an app launcher icon. If not, add an app icon to the Dreamflow assets, then use the [**flutter_launcher_icons**](https://pub.dev/packages/flutter_launcher_icons) package or ask the AI agent to set it up for you.
2019
- Ensure your app bundle identifier is correct, as it cannot be changed after publishing. To update the bundle identifier, you can use the [**change_app_package_name**](https://pub.dev/packages/change_app_package_name) package or simply ask the AI agent.
2120
- It's recommended to [**test your app on a real device**](../test/test-on-mobile-device.md) before deployment.
2221

docs/test-and-publish/publish/google-playstore-deployment.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ keywords: [Google Play Store, Deployment, Dreamflow, Android]
1313
Dreamflow allows you to deploy your apps directly to the Google Play Store from within the platform. This guide covers all the necessary prerequisites, a step-by-step deployment process, and common troubleshooting tips.
1414

1515
:::info[Prerequisites]
16-
16+
- Ensure you have [**set an app launcher icon**](pre-checks-publishing.md#add-app-launcher-icon).
1717
- Register for a [**Google Play Developer account**](https://play.google.com/console/signup).
18-
- Ensure you have set an app launcher icon. If not, add an app icon to the Dreamflow assets, then use the [**flutter_launcher_icons**](https://pub.dev/packages/flutter_launcher_icons) package or ask the AI agent to set it up for you.
1918
- Ensure your app package name is correct, as it cannot be changed after deployment. To verify it, open `android/app/build.gradle` and check the `applicationId`. To update the package name, you can use the [**change_app_package_name**](https://pub.dev/packages/change_app_package_name) package or simply ask the AI agent.
2019
- It's recommended to [**test your app on a real device**](../test/test-on-mobile-device.md) before deployment.
2120

88.6 KB
Binary file not shown.

docs/test-and-publish/publish/pre-checks-publishing.md

Lines changed: 175 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,178 @@ Here’s a comprehensive list of these prechecks:
2727
9. **License and Third-Party Attributions**: Adhere to licenses and include necessary attributions for third-party libraries and assets.
2828
10. **Prepare Marketing Assets**: Prepare all the necessary marketing assets, such as screenshots, app icons, and promotional text.
2929
11. **Error Logging & Monitoring**: Integrate crash reporting and analytics (e.g., Firebase Crashlytics, Sentry) before release. Try triggering test crashes in debug or staging builds to confirm reports are collected correctly.
30-
12. **Offline & Poor Network Support**: Validate app behavior with no connectivity and high-latency/packet-loss scenarios. Provide cached content, retry/backoff for API calls, and clear offline states.
30+
12. **Offline & Poor Network Support**: Validate app behavior with no connectivity and high-latency/packet-loss scenarios. Provide cached content, retry/backoff for API calls, and clear offline states.
31+
32+
33+
## Add App Launcher Icon
34+
35+
An **app launcher icon** is the small image that represents your app on a device’s home screen.
36+
37+
When you create a new app in Dreamflow, it sets a default Dreamflow logo as the launcher icon. To give your app a unique identity, you should replace this with your own custom icon. Follow the steps below to update the launcher icon:
38+
39+
1. Go to the [**Assets**](../../workspace/modules-panel/assets.md) module in Dreamflow and upload your icon image. For best results, use a square, high-resolution source image (i.e., **1024×1024 px**) to ensure your app icon looks sharp across all devices and sizes.
40+
2. Update the code to use the new app icon. Dreamflow uses the [`flutter_launcher_icons`](https://pub.dev/packages/flutter_launcher_icons) package to set launcher icons for both platforms. You can either:
41+
42+
- Ask the Agent to do it automatically. For example, you can say:
43+
```text
44+
I uploaded app_icon.png to the Assets module. Please set it as the app launcher icon using flutter_launcher_icons.
45+
- Or do it manually by updating the `image_path` in your `pubspec.yaml` file to point to the newly uploaded app icon. Here is the example configuration in `pubspec.yaml` file:
46+
47+
```jsx
48+
flutter_launcher_icons:
49+
android: true
50+
ios: true
51+
image_path: assets/images/app_icon.png
52+
remove_alpha_ios: true
53+
```
54+
55+
<div style={{
56+
position: 'relative',
57+
paddingBottom: 'calc(52.67989417989418% + 41px)', // Keeps the aspect ratio and additional padding
58+
height: 0,
59+
width: '100%'}}>
60+
<iframe
61+
src="https://demo.arcade.software/xzNj2YwPUvpxlrNQCv1r?embed&show_copy_link=true"
62+
title=""
63+
style={{
64+
position: 'absolute',
65+
top: 0,
66+
left: 0,
67+
width: '100%',
68+
height: '100%',
69+
colorScheme: 'light'
70+
}}
71+
frameborder="0"
72+
loading="lazy"
73+
webkitAllowFullScreen
74+
mozAllowFullScreen
75+
allowFullScreen
76+
allow="clipboard-write">
77+
</iframe>
78+
</div>
79+
<p></p>
80+
81+
:::info
82+
83+
- The Agent can’t generate a launcher icon image for you; you need to upload your own image file in the **Assets** module.
84+
- The app icon is generated during native builds (Android/iOS) before deployment. However, if you want to verify that it’s configured correctly, you can download and run the app locally on your machine. To do so:
85+
- Ensure your Flutter environment is properly set up by following the instructions for [**Android**](../test/test-on-mobile-device.md#android-setup) or [**iOS**](../test/test-on-mobile-device.md#ios-setup), depending on the platform you want to test.
86+
- [**Download the project**](../test/test-on-mobile-device.md#download-code-and-run), open it in your preferred IDE, and run:
87+
88+
```jsx
89+
dart run flutter_launcher_icons
90+
```
91+
92+
- Build and run the app on a device, then check the device’s home screen to confirm the new icon appears.
93+
:::
94+
95+
### Platform-Specific Icon Configuration
96+
97+
If you want to use different icons for Android and iOS, you can set platform-specific paths. This is useful if your design team provides unique assets for each platform.
98+
99+
To do so, upload separate icons for each platform to [Assets](../../workspace/modules-panel/assets.md) module, then you can either:
100+
101+
- Ask the Agent to do it automatically. For example, you can say:
102+
103+
```text
104+
I uploaded separate icons for Android (app_icon_android.png) and iOS (app_icon_ios.png) to the Assets module. Please configure flutter_launcher_icons to use separate icons for both the platform.
105+
```
106+
107+
- Or manually update your `pubspec.yaml` as shown below:
108+
109+
```yaml
110+
flutter_launcher_icons:
111+
android: true
112+
ios: true
113+
image_path_android: assets/images/app_icon_android.png # Path to the Android app icon.
114+
image_path_ios: assets/images/app_icon_ios.png # Path to the iOS app icon.
115+
remove_alpha_ios: true
116+
117+
```
118+
119+
### Adaptive Icons for Android
120+
121+
Android supports [**adaptive icons**](https://developer.android.com/develop/ui/views/launch/icon_design_adaptive#design-adaptive-icons), which allow your app icon to adapt to different shapes (circle, square, squircle, etc.).
122+
123+
To setup adaptive icons, you can either use this [online tool](https://icon.kitchen/) or use these [resources](https://docs.flutterflow.io/resources/projects/settings/general-settings#create-adaptive-icon) to create one. Upload them to [Assets](../../workspace/modules-panel/assets.md) module, then you can either:
124+
125+
- Ask the Agent to do it automatically. For example, you can say:
126+
127+
**With image background:**
128+
```
129+
I uploaded icon_bg.png and icon_fg.png to the Assets module.
130+
Please configure flutter_launcher_icons to use icon_bg.png as the adaptive icon background and icon_fg.png as the foreground, with a 16% inset.
131+
```
132+
133+
**With solid color background:**
134+
```
135+
I uploaded icon_fg.png to the Assets module.
136+
Please configure flutter_launcher_icons to use a solid white background ("#FFFFFF") and icon_fg.png as the adaptive icon foreground, with a 16% inset.
137+
```
138+
139+
- Or manually update your `pubspec.yaml` as shown below:
140+
141+
```jsx
142+
flutter_launcher_icons:
143+
android: true
144+
ios: true
145+
image_path: "assets/images/app_icon.png"
146+
147+
# For adaptive icon support:
148+
adaptive_icon_background: "assets/images/icon_bg.png" # image or solid color ("#FFFFFF")
149+
adaptive_icon_foreground: "assets/images/icon_fg.png" # your logo / symbol image
150+
adaptive_icon_foreground_inset: 16 # optional padding percentage (default is 16)
151+
152+
```
153+
154+
:::info
155+
156+
- Both `adaptive_icon_background` and `adaptive_icon_foreground` must be set for adaptive icons to be generated.
157+
- If you do not specify adaptive layers, `flutter_launcher_icons` will fall back to generating legacy (non-adaptive) icons.
158+
159+
:::
160+
161+
162+
#### Adaptive Icon Resources
163+
164+
See the following resources for more information on Android adaptive icons.
165+
166+
##### Create Adaptive Icon
167+
168+
- [Create app icons in Android Studio](https://developer.android.com/studio/write/create-app-icons#create-adaptive)
169+
- [Figma template](https://material.uplabs.com/posts/adaptive-icon-sticker-sheet) (requires login)
170+
- [Bjango templates](https://github.com/bjango/Bjango-Templates) include adaptive icons
171+
- [Adobe XD template](https://github.com/faizmalkani/adaptive-icon-template-xd)
172+
173+
##### Adaptive Icon Fundamentals
174+
175+
- [Understanding Android Adaptive Icons](https://medium.com/google-design/understanding-android-adaptive-icons-cee8a9de93e2)
176+
- [Designing Adaptive Icons](https://medium.com/google-design/designing-adaptive-icons-515af294c783)
177+
- [Implementing Adaptive Icons](https://medium.com/google-developers/implementing-adaptive-icons-1e4d1795470e)
178+
179+
## FAQs
180+
181+
<details>
182+
<summary> I am getting `✗ ERROR: NoConfigFoundException – No configuration found in flutter_launcher_icons.yaml or in pubspec.yaml`. How do I fix it? </summary>
183+
184+
<p>
185+
This error means the `flutter_launcher_icons` package hasn’t been properly added to your project. To fix this, you can:
186+
187+
- **Add it manually**: Open your `pubspec.yaml`, add the [**`flutter_launcher_icons`**](https://pub.dev/packages/flutter_launcher_icons) dependency with required configuration, then refresh dependencies by clicking **Refresh Dependencies** button at bottom left side. See the detailed guide on [**adding app launcher icon**](#add-app-launcher-icon).
188+
189+
- **Use the Agent**: Click <kbd>Fix with AI</kbd> button when the error appears, and the Agent will add the required configuration for you.
190+
191+
![fix-with-ai](imgs/fix-with-ai.avif)
192+
</p>
193+
194+
</details>
195+
196+
197+
<details>
198+
<summary> Why am I seeing this error `PathNotFoundException: Cannot open file, path = 'assets/images/icon.png' (OS Error: No such file or directory, errno = 2)` ? </summary>
199+
200+
<p>
201+
This error occurs because the app icon file could not be found at the specified path. To fix this, make sure you’ve added a launcher icon [**Assets**](../../workspace/modules-panel/assets.md) module. Refer to [**adding app launcher icon**](#add-app-launcher-icon) section for step-by-step instructions.
202+
</p>
203+
204+
</details>

0 commit comments

Comments
 (0)