Let’s see how to change flutter app icon into a custom icon or logo. There are several methods for this. This method is simple and compatible with both android and ios.
Table of Contents
Add flutter_launcher_icons package
Like adding normal packages, add flutter_launcher_icons 0.9.0 package on your pubspec.yaml file.
Select the Icon
Select an icon for your application and place the icon on your flutter project folder asset.
As an example, we place an icon named ‘logo.png’ on folder ‘icon’.
Choose the Icon
You can simple choose the icon from asset using following code on pubspec.yaml:
flutter_icons: image_path: "icon/logo.png" android: true ios: true
Run Command on Terminal
flutter pub get flutter pub run flutter_launcher_icons:main
Your new icon is ready
If you get error:
Cannot open file, path = 'icon2/logo.png' (OS Error: The system cannot find the path specified.
Means you need to check the file location or file existence with name as case sensitive.
See more flutter tutorials