Search code examples
flutterdart

change app icon by 'flutter_launcher_icons


when i try to change the icon of the flutter desktop app , i found the quality of the icon is bad although the uploaded icon image in the assets is (1024*1024) why this happen ? this is the pubspec.yaml :

dev_dependencies:
  flutter_test:
    sdk: flutter
  flutter_launcher_icons: "^0.14.1"

    flutter_launcher_icons:
      android: "launcher_icon"
      # ios: true
      image_path: "assets/icon/icon.png"
      windows:
        generate: true
        image_path: "assets/icon/icon.png"
        icon_size: 256 # min:48, max:256, default: 48

and i run this line in the terminal which works well !

dart run flutter_launcher_icons

Solution

  • I had this problem with flutter_launcher_icons package

    You can change the icon of the app from the flutter project files

    1.For Android

    1. Go to any android icons generator , I use this icon_generator
    2. Upload the you icon and download the .zip file
    3. Unzip the file you will find the android file
    4. select all item in this file and copy them
    5. Go to your Flutter project then to android/app/src/main/res/
    6. Replace all the files in this file
    7. run you flutter app you will find the icon changed on the android app

    2. For Windows

    1. Go to any windows icons generator , I use this windows_icon_generator
    2. Upload the you icon and download the .ico file
    3. Go to your Flutter project then to windows/runner/resources/
    4. You will find the default flutter icon
    5. Delete it and past you icon .ico
    6. It very important to rename the new icon with app_icon
    7. run you flutter app you will find the icon changed on the windows app

    you can customize every thins on the generator