Change the App Icon in Flutter

Change the App Icon in Flutter

Sufi Aurangzeb Hossain
April 1, 2026
13 min read
Flutter

App icons are crucial for brand identity and user recognition across multiple platforms. This guide covers both automated and manual approaches to customize your Flutter application's icon, ensuring consistent branding on Android, iOS, web, and desktop platforms.

Comprehensive Guide to Customizing App Icons in Flutter

App icons are crucial for brand identity and user recognition across multiple platforms. This guide covers both automated and manual approaches to customize your Flutter application's icon, ensuring consistent branding on Android, iOS, web, and desktop platforms.

The *flutter_launcher_icons* package automates icon generation across all platforms, saving time and ensuring consistency. This is the preferred method for most Flutter projects.

Step 1: Add Required Dependency

Include the *flutter_launcher_icons* package in your project's development dependencies.

dev_dependencies:
  flutter_launcher_icons: ^<version_number>

Step 2: Configure flutter_launcher_icons

Add comprehensive configuration to your *pubspec.yaml* file for multi-platform icon generation.

flutter_icons:
  android: true
  ios: true
  web: true
  windows: true
  macos: true
  linux: true
  
  # Main icon configuration
  image_path: "assets/icon/app_icon.png"
  
  # Android-specific configuration
  android:
    enable_adaptive_icon: true
    adaptive_icon_background: "#<background_color>"
    adaptive_icon_foreground: "assets/icon/adaptive_foreground.png"
    
  # iOS-specific configuration  
  ios:
    enable_adaptive_icon: true
    
  # Web-specific configuration
  web:
    generate: true
    
  # Image path overrides for specific platforms
  image_path_android: "assets/icon/android_icon.png"
  image_path_ios: "assets/icon/ios_icon.png"
  
  # Remove alpha channel for iOS (recommended)
  remove_alpha_ios: true
  
  # Background color for iOS
  background_color_ios: "#<background_color>"

Step 3: Generate Icons

Execute the package commands to generate platform-specific icons automatically.

# Install dependencies
flutter pub get

# Generate icons for all platforms
flutter pub run flutter_launcher_icons:main

# For specific platforms
flutter pub run flutter_launcher_icons:main -f <platform>

Manual Setup Approach

For complete control or specific requirements, you can manually configure app icons for each platform.

Android Manual Configuration

Configure Android app icons with proper density-specific assets.

Required Icon Sizes for Android:

  • *mipmap-mdpi*: 48×48 pixels
  • *mipmap-hdpi*: 72×72 pixels
  • *mipmap-xhdpi*: 96×96 pixels
  • *mipmap-xxhdpi*: 144×144 pixels
  • *mipmap-xxxhdpi*: 192×192 pixels

Adaptive Icons (Android 8.0+):

  • Foreground layer: 108×108 pixels
  • Background layer: 108×108 pixels
  • Additional adaptive icon configurations
<!-- android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml -->
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
    <background android:drawable="@color/ic_launcher_background"/>
    <foreground android:drawable="@mipmap/ic_launcher_foreground"/>
    <monochrome android:drawable="@mipmap/ic_launcher_monochrome"/>
</adaptive-icon>

<!-- android/app/src/main/AndroidManifest.xml -->
<application
    android:icon="@mipmap/ic_launcher"
    android:roundIcon="@mipmap/ic_launcher_round"
    ... >
</application>

iOS Manual Configuration

Configure iOS app icons with proper size variants and asset catalog management.

Required Icon Sizes for iOS:

  • 20×20 pixels (iPhone Notification)
  • 29×29 pixels (iPhone Settings)
  • 40×40 pixels (iPhone Spotlight)
  • 60×60 pixels (iPhone App)
  • 76×76 pixels (iPad App)
  • 83.5×83.5 pixels (iPad Pro App)
  • 1024×1024 pixels (App Store)

Additional iOS Considerations:

  • No transparency in App Store icon
  • Proper corner radius adherence
  • High-resolution @2x and @3x variants
  • Asset catalog organization

iOS Implementation Steps:

  1. Open *ios/Runner.xcworkspace* in Xcode
  2. Select *Runner* target in project navigator
  3. Navigate to *Assets.xcassets* > *AppIcon*
  4. Drag and drop appropriately sized icons
  5. Verify all icon slots are filled
  6. Clean and rebuild the project

Web Platform Configuration

Configure web app icons for various browser and PWA requirements.

Required Web Icon Sizes:

  • *favicon.ico*: 16×16, 32×32 pixels (multi-size ICO)
  • *icon-192.png*: 192×192 pixels (PWA)
  • *icon-512.png*: 512×512 pixels (PWA)
  • *apple-touch-icon.png*: 180×180 pixels (iOS Safari)

Web Manifest Configuration:

// web/manifest.json
{
  "name": "<App Name>",
  "short_name": "<Short Name>",
  "start_url": ".",
  "display": "standalone",
  "background_color": "#<background_color>",
  "theme_color": "#<theme_color>",
  "icons": [
    {
      "src": "icons/icon-192.png",
      "sizes": "192x192",
      "type": "image/png"
    },
    {
      "src": "icons/icon-512.png",
      "sizes": "512x512", 
      "type": "image/png"
    }
  ]
}

macOS Desktop Configuration

Configure macOS app icons with proper layered image support.

Required macOS Icon Sizes:

  • 16×16 pixels
  • 32×32 pixels
  • 64×64 pixels
  • 128×128 pixels
  • 256×256 pixels
  • 512×512 pixels
  • 1024×1024 pixels

macOS Implementation:

  1. Open *macos/Runner.xcworkspace* in Xcode
  2. Select *Runner* target
  3. Navigate to *Assets.xcassets* > *AppIcon*
  4. Add all required icon sizes
  5. Use ICNS format for best compatibility
  6. Rebuild the macOS application

Windows Desktop Configuration

Configure Windows app icons with proper ICO file format.

Windows Icon Requirements:

  • Single *.ico* file containing multiple sizes
  • Recommended sizes: 16×16, 32×32, 48×48, 256×256
  • High color depth (32-bit with alpha channel)
  • Proper compression for file size optimization

Windows Implementation Steps:

  1. Create a multi-size ICO file
  2. Replace *windows/runner/resources/app_icon.ico*
  3. Update *windows/runner/CMakeLists.txt* if needed
  4. Rebuild the Windows application
  5. Verify icon display in File Explorer

Linux Desktop Configuration

Configure Linux app icons for various desktop environments.

Linux Icon Requirements:

  • PNG format with transparency support
  • Multiple sizes: 16×16, 32×32, 48×48, 64×64, 128×128, 256×256, 512×512
  • SVG format for scalable icons
  • Proper desktop entry configuration

Linux Implementation:

  1. Create icons in *linux/icons/* directory
  2. Update *linux/my_application.desktop* file
  3. Specify icon path in desktop entry
  4. Rebuild the Linux application
  5. Install to system icon directories

Best Practices for App Icon Design

Follow design guidelines to create effective and platform-appropriate icons.

Design Principles:

  • Simplicity: Clean, recognizable design
  • Consistency: Maintain brand identity across platforms
  • Scalability: Design for all required sizes
  • Platform Guidelines: Follow Android, iOS, and web standards
  • Contrast: Ensure visibility against various backgrounds
  • Testing: Verify appearance on actual devices

Technical Considerations:

  • Use vector graphics as source when possible
  • Export at highest resolution
  • Maintain proper aspect ratios
  • Optimize file sizes without quality loss
  • Test on different screen densities

Troubleshooting Common Issues

Address common challenges in app icon implementation.

Common Problems and Solutions:

  • Icons not updating: Clean and rebuild project
  • Wrong icon displayed: Check file names and paths
  • Blurry icons: Ensure high-resolution source images
  • Platform-specific issues: Verify platform configurations
  • Cache problems: Clear platform-specific caches
  • Build errors: Check icon file formats and sizes

Automated Testing and Validation

Implement checks to ensure icon configuration remains correct.

# Sample CI/CD check for icon validation
name: Validate App Icons

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

jobs:
  validate-icons:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - name: Validate icon configuration
      run: |
        # Check if required icon files exist
        if [ ! -f "assets/icon/app_icon.png" ]; then
          echo "Error: Main app icon missing"
          exit 1
        fi
        
        # Validate icon dimensions
        # Add image dimension checks here
        
        echo "Icon validation passed"

Platform-Specific Guidelines

Understand and implement platform-specific icon requirements.

Android Guidelines:

  • Follow Material Design principles
  • Use adaptive icons for Android 8.0+
  • Consider monochrome icons for Android 13+
  • Test on various device manufacturers

iOS Guidelines:

  • Adhere to Human Interface Guidelines
  • No transparency in App Store icon
  • Proper corner radius implementation
  • Support for dark mode appearances

Web Guidelines:

  • PWA icon requirements
  • Favicon standards
  • Browser-specific icon formats
  • Manifest.json configuration

By following this comprehensive guide, you can successfully implement custom app icons across all Flutter-supported platforms, ensuring consistent branding and professional appearance for your application on mobile, web, and desktop environments.