Introduction
Dynamic app icons let apps change their launcher icon at runtime to reflect state, theme, or events. In mobile development with Flutter, creating dynamic icons involves platform-specific capabilities (iOS supports alternate icons natively; Android requires shortcut or launcher workarounds). This tutorial shows a practical, code-forward approach: asset preparation, platform considerations, a simple MethodChannel pattern, and testing/deployment notes.
Preparing Assets
Create icon variants with consistent sizes and safe areas. For iOS provide icons in 20pt, 29pt, 40pt, 60pt @1x/@2x/@3x as needed, and include an AppIcon set in Xcode with all alternate icon files. Name assets predictably, e.g., app_icon_default.png, app_icon_event.png, app_icon_dark.png.
For Android produce adaptive icons: foreground and background layers in png or XML vector drawables. Adaptive icon sizes are typically 108dp for the full icon; export at 432x432px for @4x to be safe. Place assets in the appropriate mipmap- or drawable-folders. Note: Android launchers rarely allow direct runtime replacement of the installed app icon; you will use shortcuts or the ShortcutManager API for most effects.
Use a consistent naming scheme and generate assets via a tool (Sketch, Figma, or command-line image scripts). Include metadata in your repo that maps logical icon names to file names and platform details.
Platform Considerations
iOS
iOS 10.3+ supports alternate icons via UIApplication.setAlternateIconName in native code. You must register alternate icons in Info.plist under CFBundleIcons/CFBundleAlternateIcons. The user sees the icon change immediately; the system presents the home screen animation.
Android
Android does not have a universal, guaranteed API to swap the main launcher icon. Options:
Use ShortcutManager to create or update pinned shortcuts with custom icons (API 26+).
Provide multiple launcher activities with different intent-filters, enable/disable them via PackageManager to simulate icon switching (works on many OEM launchers but can be flaky).
Rely on third-party launchers that support dynamic icons.
Because the approaches differ, your Flutter app should detect platform and use the appropriate method. Keep the UX clear: changing the icon may require confirmation or a relaunch on some devices.
Implementation Steps
1) Expose a Dart API that requests an icon change and defers to platform code. Use MethodChannel when you need custom native handlers or use an existing plugin when available (for iOS convenience).2) Implement native handlers: Swift/Objective-C for iOS and Kotlin/Java for Android. The iOS handler will call setAlternateIconName; the Android handler can create or update a pinned shortcut or toggle enabled components.
Dart MethodChannel example:
import 'package:flutter/services.dart';
class AppIconController {
static const MethodChannel _channel = MethodChannel('app.icon.channel');
static Future<void> setIcon(String? name) async {
try {
await _channel.invokeMethod('setIcon', {'name': name});
} on PlatformException catch (e) {
print('Icon change failed: $e');
}
}
}If you prefer a plugin, flutter_dynamic_icon exposes similar functions on iOS and provides Android fallbacks where possible. Example call:
await FlutterDynamicIcon.setAlternateIconName('app_icon_event');Remember to update iOS Info.plist and ensure all icon filenames match the registered keys.
Testing And Deployment
Test on real devices and multiple launchers. On iOS, verify that Info.plist entries are correct and that switching restores the default icon when passing null. On Android, test both ShortcutManager and multiple-launcher-component approaches across Pixel, Samsung, Xiaomi, and popular third-party launchers.
Edge cases and UX:
Fallback handling: if the platform call fails, show a user-friendly message and fallback to an in-app theme change.
Permissions: pinned shortcuts require user consent in some flows; explain what will happen before requesting.
App Store Guidelines: ensure your icon changes are not deceptive and follow Apple and Google guidelines.
CI and asset validation: add a build check that verifies all registered icon names exist in your asset catalog and that iOS Info.plist is updated. This avoids runtime failures.
Vibe Studio

Vibe Studio, powered by Steve’s advanced AI agents, is a revolutionary no-code, conversational platform that empowers users to quickly and efficiently create full-stack Flutter applications integrated seamlessly with Firebase backend services. Ideal for solo founders, startups, and agile engineering teams, Vibe Studio allows users to visually manage and deploy Flutter apps, greatly accelerating the development process. The intuitive conversational interface simplifies complex development tasks, making app creation accessible even for non-coders.
Conclusion
Dynamic app icons can enhance user engagement when used thoughtfully. In Flutter, implement a small Dart API backed by MethodChannel or an existing plugin, prepare platform-specific assets, and respect platform differences: native alternate icons on iOS and shortcut or component approaches on Android. Test broadly, validate assets in CI, and design a clear UX so users understand why the icon changes. With careful implementation, dynamic icons become a reliable, polished feature in your mobile development toolkit.