Site icon NgDeveloper

How to replace the default flutter icon ?

Add flutter_launcher_icons as dev_dependency

dev_dependencies:
  flutter_launcher_icons:

Add flutter_icons section in pubspec.yaml file

Make sure to have the images in the below path and the size of the image in my case is,

icons/ngdeveloper.PNG -> 64×64

flutter_icons:
  ios: false
  android: true
  image_path: "assets/images/ngdeveloper.png"
  image_path_ios: "assets/images/ngdeveloper.png"
  image_path_android: "assets/icons/ngdeveloper.PNG"

Run the below commands

flutter pub get
flutter pub run flutter_launcher_icons:main

Now you can generate the release version and cross check on the device.

flutter build apk --release --no-tree-shake-icons
Exit mobile version