1

enter image description here

How to change the app icon in Flutter using VS Code?

I am trying it again and again but it's not working. I've seen different methods online with no positive outcome.

Toni
  • 1,555
  • 4
  • 15
  • 23
Tayyab Zaman
  • 11
  • 1
  • 4
  • Does this answer your question? [How to change the application launcher icon on Flutter?](https://stackoverflow.com/questions/43928702/how-to-change-the-application-launcher-icon-on-flutter) – Md. Yeasin Sheikh Dec 18 '21 at 13:56

3 Answers3

2

You can make use of the flutter_launcher_icons: ^0.9.2 package

Create new folder named assets and a subfolder inside that named icon then make changes in your pubspec.yaml file like following:

dev_dependencies:
  flutter_launcher_icons: "^0.9.2"

flutter_icons:
  android: "launcher_icon"
  ios: true
  image_path: "assets/icon/icon.png"  

Here the icon image should be icon.png and it will be stored in the path : assets/icon

now in terminal run

flutter pub get

for further info check this as reference. And this video might be helpful.

raiyan22
  • 1,043
  • 10
  • 20
0

With the help of flutter plugin you may change flutter icon package:

flutter_launcher_icons: ^0.9.2

  • Step 1:
dev_dependencies:
  flutter_launcher_icons: "^0.9.2"

flutter_icons:
  android: "launcher_icon"
  ios: true
  image_path: "assets/icon/icon.png"
  • Step 2:
flutter pub get
Keivan
  • 1,300
  • 1
  • 16
  • 29
0

Use current method Flutter Launcher Icons.

  1. Edit pubspec.yaml file:
dev_dependencies:
  flutter_launcher_icons: "^0.10.0"

flutter_icons:
  android: "launcher_icon"
  ios: true
  image_path: "assets/icon/icon.png"
  min_sdk_android: 21 # android min sdk min:16, default 21
  web:
    generate: true
    image_path: "path/to/image.png"
    background_color: "#hexcode"
    theme_color: "#hexcode"
  windows:
    generate: true
    image_path: "path/to/image.png"
    icon_size: 48 # min:48, max:256, default: 48
  1. Go to Terminal:
flutter pub get
flutter pub run flutter_launcher_icons:main

Have a nice day...

Source: [https://pub.dev/packages/flutter_launcher_icons][1]

Sapto Sutardi
  • 326
  • 4
  • 11