flutter-app-icon-engineering
Skill8 starsChanged 48 days agoMITView on GitHub
Use when configuring, generating, replacing, auditing, validating, fixing, or troubleshooting application launcher icons in a Flutter project for any platform — Android (including adaptive, monochrome, themed), iOS, macOS, Web (favicon, PWA manifest), Windows (.ico), or Linux. Also use when integrating flutter_launcher_icons, preparing icon source assets, diagnosing missing or stale icons after builds, or resolving icon-related App Store and Play Store submission failures.
In this repository70 other files it gives its agents.
- camerawesome-flutterSkill
- dart-args-production-cliSkill
- dart-flutter-equatable-engineeringSkill
- dart-flutter-ffi-systems-engineeringSkill
- dart-metaSkill
- document-camera-frameSkill
- document-scan-flutterSkill
- figma-to-flutter-expertSkill
- flutter-animations-production-engineeringSkill
- flutter-app-hardening-reverse-engineeringSkill
- flutter-application-security-engineeringSkill
- flutter-app-links-deep-link-engineeringSkill
- flutter-cachingSkill
- flutter-concurrency-memory-performanceSkill
- flutter-confetti-engineeringSkill
- flutter-dart-package-engineeringSkill
- flutter-design-system-from-design-mdSkill
- flutter-dio-cache-interceptor-engineeringSkill
- flutter-dio-engineeringSkill
- flutter-doc-scannerSkill
- flutter-drift-persistence-engineeringSkill
- flutter-expert-tipsSkill
- flutter-firebase-analyticsSkill
- flutter-firebase-core-engineeringSkill
- flutter-firebase-messagingSkill
- flutter-get-it-injectable-dependency-injectionSkill
- flutter-go-router-engineeringSkill
- flutter-hive-persistence-engineeringSkill
- flutter-image-performanceSkill
- flutter-image-picker-production-engineeringSkill
- flutter-lints-static-analysis-engineeringSkill
- flutter-local-notifications-production-engineeringSkill
- flutter-memory-leak-engineeringSkill
- flutter-mobile-developmentSkill
- flutter-motion-engineeringSkill
- flutter-multi-environmentSkill
- flutter-native-splash-engineeringSkill
- flutter-package-plugin-selectionSkill
- flutter-path-provider-production-storageSkill
- flutter-performance-jank-optimizationSkill
- flutter-permission-handler-engineeringSkill
- flutter-pinputSkill
- flutter-production-build-releaseSkill
- flutter-production-engineeringSkill
- flutter-production-loggingSkill
- flutter-pro-image-editor-engineeringSkill
- flutter-secure-storage-security-engineeringSkill
- flutter-sentry-engineeringSkill
- flutter-share-plus-engineeringSkill
- flutter-skeletonizer-engineeringSkill
- flutter-squadron-concurrency-engineeringSkill
- flutter-supabase-engineeringSkill
- flutter-svg-engineeringSkill
- flutter-ui-performance-engineeringSkill
- flutter-url-launcher-engineeringSkill
- flutter-video-player-production-engineeringSkill
- flutter-webview-production-engineeringSkill
- freezed-production-engineeringSkill
- html-to-flutterSkill
- hydrated-blocSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
31 rules. About 0 are common, 20 are distinctive, and 11 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈20
Distinctive · estimate
This author's own choices. Worth a look.
11
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Before changing any icon asset or configuration:
- Very specific: line 16
Read pubspec.yaml — SDK constraints, existing flutter_launcher_icons config, and dev_dependencies.
- Very specific: line 22
Check AndroidManifest.xml for android:icon and android:roundIcon.
- Very specific: line 25
Check web/manifest.json icon entries and web/index.html favicon link.
- Very specific: line 26
Check windows/runner/Runner.rc icon reference.
- Very specific: line 28
Look for any flutter_launcher_icons.yaml or per-flavor config files.
- Distinctive: line 31
Do not modify platforms that are absent from the project or that the user has not asked about.
- Distinctive: line 61
Only one platform needs an icon update.
- Distinctive: line 77
Start with a 1024×1024 px PNG on a square canvas:
- Distinctive: line 79
iOS: No transparency. Opaque fill to the edges.
- Distinctive: line 89
When one source image serves all platforms, use an opaque 1024×1024 PNG with the logo centered in the inner 66% (safe zone for adaptive …
- Distinctive: line 93
Use sRGB or Display P3 color profiles.
- Distinctive: line 94
Keep the source image under version control.
- Very specific: line 105
Always dev_dependencies — it is a build-time tool with zero runtime footprint.
- Very specific: line 139
Only include platforms that exist in the project.
- Distinctive: line 155
After generation, inspect the generated files for each platform.
- Very specific: line 160
Does not modify AndroidManifest.xml (assumes @mipmap/ic_launcher is set).
- Very specific: line 161
Does not modify the Xcode project file (.pbxproj) or Info.plist.
- Distinctive: line 162
Does not add macOS icon shape or shadow to generated PNGs.
- Distinctive: line 163
Does not generate iOS 18+ dark/tinted icon variants.
- Distinctive: line 164
Does not validate adaptive-icon safe-zone compliance.
- Very specific: line 165
Does not set up Linux .desktop files or FreeDesktop icon theme directories.
- Distinctive: line 172
Verify generated files exist at the expected paths for each platform.
- Very specific: line 173
Check image dimensions match platform requirements (use file or identify / sips commands).
- Distinctive: line 206
Do not claim a platform is verified unless its build actually succeeded.
- Distinctive: line 207
When the toolchain is unavailable, state which platforms remain unverified.
- Distinctive: line 225
When a fix does not resolve the issue, verify the asset pipeline end-to-end: source image → generator output → native project reference → …
- Distinctive: line 242
Using a low-resolution source image: Start with 1024×1024 minimum.
- Distinctive: line 248
Check dimensions, formats, references, and platform builds.
- Distinctive: line 284
flutter_launcher_icons: Verify the current version on pub.dev before relying on specific config keys.
- Distinctive: line 295
When a task depends on a recent platform change, verify the relevant official documentation before proceeding.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Flutter App Icon Engineering
Configure application icons correctly across all Flutter deployment targets. Each platform has distinct asset formats, directory structures, and build-system references. Treat them as independent pipelines that share a single source image.
Start with evidence
Before changing any icon asset or configuration:
- Read
pubspec.yaml— SDK constraints, existingflutter_launcher_iconsconfig, anddev_dependencies. - List which platform directories exist (
android/,ios/,web/,windows/,macos/,linux/). Only configure platforms that are present and intended. - Inspect existing icon assets in every present platform directory (paths in the Platform Requirements table below).
- Check
AndroidManifest.xmlforandroid:iconandandroid:roundIcon. - Check
ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.jsonformat — is it modern single-icon or legacy multi-size? - Check
web/manifest.jsonicon entries andweb/index.htmlfavicon link. - Check
windows/runner/Runner.rcicon reference. - Check
macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json. - Look for any
flutter_launcher_icons.yamlor per-flavor config files. - Determine the task: new icon, replacement, fix, audit, or automation.
Do not modify platforms that are absent from the project or that the user has not asked about.
Platform requirements
| Platform | Format | Location | Key sizes | Config reference |
| Android | PNG (mipmap dirs) + XML (adaptive) | android/app/src/main/res/mipmap-*/ | 48–192 px legacy; 108–432 px adaptive layers | AndroidManifest.xml android:icon |
| iOS | PNG (asset catalog) | ios/Runner/Assets.xcassets/AppIcon.appiconset/ | 1024×1024 single (Xcode 15+) or multiple legacy sizes | Contents.json, Xcode build setting ASSETCATALOG_COMPILER_APPICON_NAME |
| macOS | PNG (asset catalog) | macos/Runner/Assets.xcassets/AppIcon.appiconset/ | 16–1024 px (multiple required) | Contents.json with idiom: mac |
| Web | PNG | web/favicon.png, web/icons/ | 16 favicon; 192+512 PWA; 192+512 maskable | web/manifest.json, web/index.html |
| Windows | ICO | windows/runner/resources/app_icon.ico | 16–256 in single .ico container | windows/runner/Runner.rc |
| Linux | PNG or SVG | Project-specific; no default generated | 256 or 512 recommended | .desktop file Icon field |
See references/platform-implementation.md for exact file layouts, Contents.json
templates, XML examples, and per-platform step-by-step procedures.
Decision framework
Choose the approach that matches the project's needs:
Use flutter_launcher_icons when
- Multiple platforms need icons from a single source image.
- The project does not have heavily customized native icon resources.
- Adaptive Android icons (foreground + background + monochrome) are needed.
- The team wants reproducible, config-driven generation.
Use native platform tooling when
- Only one platform needs an icon update.
- The project has custom native icon resources the generator would overwrite.
- iOS 18+ dark/tinted icon variants are required (the generator does not support them as of v0.14.3).
- macOS icons need the traditional rounded-rectangle shape with drop shadow (the generator does not add shape or shadow).
- Precise control over every generated asset is required.
Use a custom pipeline when
- CI/CD must generate icons from SVG or vector sources.
- The project uses non-standard directory structures or icon names.
- Multiple brands or white-label builds need different icons.
Source asset preparation
Start with a 1024×1024 px PNG on a square canvas:
- iOS: No transparency. Opaque fill to the edges. No rounded corners — iOS masks them automatically (~17.5% radius).
- Android adaptive: Foreground on 108 dp canvas with content inside the 66 dp safe-zone circle. Background can be a color or image. Monochrome variant is single-color (grayscale) on transparent background.
- macOS: Can have transparency. Should include the rounded-rectangle shape and shadow in the image itself — macOS does not auto-mask.
- Web: Can have transparency. Maskable variants need extra safe-zone padding.
- Windows: Can have transparency. The ICO container holds multiple sizes.
When one source image serves all platforms, use an opaque 1024×1024 PNG with the logo centered in the inner 66% (safe zone for adaptive masking). Provide separate platform-specific source images when visual requirements differ.
Use sRGB or Display P3 color profiles. Avoid CMYK. Use lossless PNG — not JPEG. Keep the source image under version control; generated assets are derived output.
flutter_launcher_icons workflow
1. Add the dependency
dev_dependencies:
flutter_launcher_icons: ^0.14.3Always dev_dependencies — it is a build-time tool with zero runtime footprint.
2. Configure
In pubspec.yaml or a separate flutter_launcher_icons.yaml:
flutter_launcher_icons:
image_path: "assets/icon/icon.png"
android: true
min_sdk_android: 21
adaptive_icon_foreground: "assets/icon/foreground.png"
adaptive_icon_background: "#FFFFFF"
adaptive_icon_monochrome: "assets/icon/monochrome.png"
ios: true
remove_alpha_ios: true
web:
generate: true
image_path: "assets/icon/icon.png"
background_color: "#FFFFFF"
theme_color: "#000000"
windows:
generate: true
image_path: "assets/icon/icon.png"
macos:
generate: true
image_path: "assets/icon/icon.png"Only include platforms that exist in the project. Set remove_alpha_ios: true
unless the source image is already opaque.
3. Generate
dart run flutter_launcher_iconsFor a specific flavor:
dart run flutter_launcher_icons --flavor dev4. Verify generated output
After generation, inspect the generated files for each platform. See the Validation section below.
What the generator does NOT do
- Does not modify
AndroidManifest.xml(assumes@mipmap/ic_launcheris set). - Does not modify the Xcode project file (
.pbxproj) orInfo.plist. - Does not add macOS icon shape or shadow to generated PNGs.
- Does not generate iOS 18+ dark/tinted icon variants.
- Does not validate adaptive-icon safe-zone compliance.
- Does not set up Linux
.desktopfiles or FreeDesktop icon theme directories. - Overwrites existing icon files without backup.
Validation
Static checks (always possible)
- Verify generated files exist at the expected paths for each platform.
- Check image dimensions match platform requirements (use
fileoridentify/sipscommands). - Validate
Contents.jsonis well-formed JSON with correctfilename,idiom,size, andscaleentries. - Validate
ic_launcher.xmlreferences valid drawables. - Confirm
AndroidManifest.xmlandroid:icon="@mipmap/ic_launcher". - Confirm
web/manifest.jsonicon entries reference existing files. - Confirm
windows/runner/Runner.rcreferencesapp_icon.ico. - Confirm iOS icon PNGs have no alpha channel:
sips -g hasAlpha ios/Runner/Assets.xcassets/AppIcon.appiconset/*.png
Platform builds (when toolchain is available)
# Android — requires Android SDK
flutter build apk --debug
# iOS — requires macOS + Xcode
flutter build ios --debug --no-codesign
# Web
flutter build web
# Windows — requires Windows + Visual Studio
flutter build windows
# macOS — requires macOS + Xcode
flutter build macos
# Linux — requires Linux + build tools
flutter build linuxDo not claim a platform is verified unless its build actually succeeded. When the toolchain is unavailable, state which platforms remain unverified.
Troubleshooting
| Symptom | Likely cause | Fix |
| Default Flutter icon still showing | Generated assets not in correct mipmap dirs, or build cache stale | Verify files exist at correct paths. Run flutter clean && flutter pub get, then rebuild. |
| Only some platforms show new icon | Generator skipped platforms with generate: false or missing config | Check config — web, windows, macos need explicit generate: true. |
| Android icon cropped or zoomed | Foreground content outside 66dp safe zone | Redesign foreground: keep critical content inside inner 61% of canvas. |
| Android themed icon not working | Missing adaptive_icon_monochrome config, or device < API 33 | Add monochrome layer. Verify device runs Android 13+. |
| iOS build fails with alpha error | Icon PNG has transparency | Set remove_alpha_ios: true in config, or provide opaque source. |
| Xcode "unassigned children" error | Contents.json references files that don't exist in appiconset | Regenerate icons or fix filenames in Contents.json to match actual files. |
| Web favicon unchanged in browser | Browser cache | Hard refresh (Ctrl+Shift+R). Clear site data. Rename favicon with cache-busting query. |
| macOS icon has no rounded shape | Generator outputs raw PNG without macOS shape | Provide a pre-shaped macOS source image with rounded rect + shadow. |
| Windows icon appears pixelated | .ico contains only one size | Ensure .ico includes 16, 32, 48, 128, 256 px layers. |
| Generator overwrote custom icons | Package replaces files without backup | Back up custom icons before running. Use native tooling for customized setups. |
| Icon correct in debug but wrong in release | Separate debug/release resource sets in Android | Check src/debug/res/ for overrides. Remove or update them. |
When a fix does not resolve the issue, verify the asset pipeline end-to-end: source image → generator output → native project reference → build output. Cache clearing is a last resort, not a first step.
Common mistakes
- Running the generator on every build. Icon generation is a one-time step when the source image changes. Do not add it to build hooks or CI pipelines that run on every commit.
- Putting
flutter_launcher_iconsindependencies. It belongs indev_dependencies. It adds zero runtime code. - Ignoring platform differences. iOS forbids transparency. macOS needs the shape in the image. Android uses layers. Treating all platforms identically produces broken icons.
- Not inspecting existing icons before replacing. The project may have custom native icons, adaptive XML, or flavor-specific overrides. Overwriting blindly destroys intentional customizations.
- Using a low-resolution source image. Start with 1024×1024 minimum. Upscaling a 256 px image produces blurry icons across high-density devices.
- Assuming generation configures everything. The generator creates image
files but does not set up
AndroidManifest.xml,.desktopfiles, or Xcode build settings. These must already be correct. - Not validating after generation. Files existing is not proof of correctness. Check dimensions, formats, references, and platform builds.
Completion checklist
Before reporting success:
- Source image is ≥1024×1024, PNG, sRGB or P3, square canvas
- Only platforms present in the project were configured
- Existing native customizations were preserved or intentionally replaced
flutter_launcher_iconsis indev_dependencies(if used)- Generator was run and completed without errors (if used)
- Android: mipmap directories populated, adaptive XML valid, manifest references correct
- iOS: AppIcon.appiconset populated, Contents.json valid, no alpha channel
- macOS: AppIcon.appiconset populated with all sizes, Contents.json valid
- Web: favicon.png + manifest icons exist, manifest.json references correct
- Windows: app_icon.ico exists with multiple sizes, Runner.rc references it
- Linux: icon file exists, .desktop file references it (if packaging configured)
- Each platform build succeeds (or state which platforms lack toolchain)
- Git diff reviewed — only expected files changed
Official references
Version sensitivity
- flutter_launcher_icons: Verify the current version on pub.dev before relying on specific config keys. The schema evolves between minor releases.
- Android adaptive icons: API 26+ (Android 8.0). Monochrome: API 33+ (Android 13).
- iOS single-icon approach: Xcode 15+ / iOS 17+. Older Xcode versions require legacy multi-size icons.
- iOS dark/tinted variants: iOS 18+ / Xcode 16+. Not supported by the generator as of v0.14.3.
- macOS icon requirements: Multiple sizes always required — no single-icon shortcut exists.
When a task depends on a recent platform change, verify the relevant official documentation before proceeding.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

