I am trying to add a launcher icon to my flutter app. I have followed all the steps required to create a launcher icon.
This is my pubspec.yaml file
dev_dependencies:
flutter_test:
sdk: flutter
flutter_launcher_icons: ^0.9.2
flutter_icons:
android: true
image_path_android: "icons/opicon.png"
image_path: icons/opicon.png
ios: true
remove_alpha_ios: true
I have even made a change in android/app/build.gradle file
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.loginpage"
minSdkVersion 21
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
I have even got a successful message from flutter
PS D:\Flutter_Projects\loginpage> flutter pub run flutter_launcher_icons:main
════════════════════════════════════════════
FLUTTER LAUNCHER ICONS (v0.9.1)
════════════════════════════════════════════
• Creating default icons Android
• Overwriting the default Android launcher icon with a new icon
• Overwriting default iOS launcher icon with new icon
✓ Successfully generated launcher icons
But on the emulator, the launcher icon hasn't changed. It still has the default flutter icon.
This is the screenshot of the emulator
This is my project folder
The Highlighted folder is where I am having the icon image.
In pubspec.yaml file-
and then run
flutter pub get flutter pub run flutter_launcher_icons:main
After creating icon successful, uninstall app and then flutter run.