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.

1

3 Answers 3

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.

Sign up to request clarification or add additional context in comments.

Comments

1

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 

Comments

1

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]

1 Comment

Thanks, I was missing flutter pub run flutter_launcher_icons:main

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.