Introduction
Adaptive icons and app shortcuts elevate your Flutter app’s user experience by ensuring consistent branding across devices and providing quick actions directly on the home screen. In this tutorial, you’ll learn how to design and integrate adaptive icons plus define Android app shortcuts in Flutter. We’ll cover asset preparation, manifest configuration, and a Dart-based approach for dynamic shortcuts.
Understanding Adaptive Icons
Adaptive icons consist of two layers—foreground and background—rendered by Android’s launcher to match various shapes (circle, square, squircle). Benefits include:
• Visual consistency across OEM launchers
• Automatic shape masking
• Lightweight assets for better performance
Key points:
• Provide 108×108 dp layers (432×432 px at xxxhdpi).
• Use transparent background on the foreground layer.
• Keep important content within the safe zone (72×72 dp).
Implementing Adaptive Icons in Flutter
You can automate icon generation with flutter_launcher_icons or do it manually. Here’s the manual approach:
Place ic_launcher_foreground.png and ic_launcher_background.png under android/app/src/main/res/mipmap-*/.
Edit android/app/src/main/AndroidManifest.xml:
<application
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:adaptiveIcon="@mipmap/ic_launcher">
...
</application>Ensure each mipmap- folder contains the same filenames but at appropriate resolutions:
• mipmap-mdpi (48×48 px)
• mipmap-hdpi (72×72 px)
• mipmap-xhdpi (96×96 px)
• mipmap-xxhdpi (144×144 px)
• mipmap-xxxhdpi (192×192 px)
Alternatively, install and configure flutter_launcher_icons in pubspec.yaml:
dev_dependencies:
flutter_launcher_icons: "^0.9.2"
flutter_icons:
android: true
ios: true
image_path_foreground: "assets/icons/foreground.png"
image_path_background: "assets/icons/background.png"
Then run:
flutter pub run flutter_launcher_icons:main
Creating App Shortcuts
Android app shortcuts let users perform tasks directly from the home screen. You can define static shortcuts via XML or dynamic ones in Dart.
Static Shortcuts
Create res/xml/shortcuts.xml:
<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
<shortcut
android:shortcutId="compose"
android:enabled="true"
android:icon="@drawable/ic_compose"
android:shortcutShortLabel="Compose"
android:shortcutLongLabel="Compose Message">
<intent
android:action="android.intent.action.VIEW"
android:targetPackage="${applicationId}"
android:targetClass="${applicationId}.MainActivity">
<extra android:name="action" android:value="compose"/>
</intent>
</shortcut>
</shortcuts>Reference it in AndroidManifest.xml:
<application>
<activity ...>
<meta-data
android:name="android.app.shortcuts"
android:resource="@xml/shortcuts"/>
</activity>
</application>Dynamic Shortcuts in Dart
For dynamic app shortcuts, use the android_shortcuts package or platform channels. Here’s a Dart snippet using android_shortcuts:
import 'package:android_shortcuts/android_shortcuts.dart';
void setupDynamicShortcuts() async {
await AndroidShortcuts.setShortcutItems([
ShortcutItem(
id: 'profile',
shortLabel: 'Profile',
icon: 'ic_profile',
intent: ShortcutIntent(
action: 'FLUTTER_APP',
data: 'app://profile'
),
),
ShortcutItem(
id: 'search',
shortLabel: 'Search',
icon: 'ic_search',
intent: ShortcutIntent(data: 'app://search'),
),
]);
}Call setupDynamicShortcuts() after app initialization. Each item appears when the user long-presses the app icon.
Testing and Optimization
Emulators: Use Android Studio’s Pixel images with different launchers to verify adaptive icon behavior.
Real devices: Test on OEM devices (Samsung, Xiaomi) to ensure shape masking works.
Shortcut previews: On supported devices (Android 7.1+), long-press your app icon and confirm shortcuts appear and deep links navigate correctly.
Asset audit: Ensure no layer is truncated by masking—keep critical graphics within the safe zone.
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
Adaptive icons and app shortcuts enrich your app’s visibility and user engagement. By following best practices for asset creation, manifest configuration, and dynamic shortcut setup, you’ll deliver a polished, platform-native experience.