I was looking for changing the app icon of my current app. I cane around the package name flutter_launcher_icons.
I also found I can do by putting an image in mipmap-xxxhdpi in android/app/res folder. And it works.
So my question is why we need additional package(flutter_launcher_icons) for this.
true : Override the default existing Flutter launcher icon for the platform specified. false : Ignore making launcher icons for this platform. icon/path/here. png : This will generate a new app icon for the platform with the name you specify, without removing the old default existing Flutter launcher icon.
When you use the package flutter_launcher_icons it will automatically generate different icon sizes for the app which is better than just putting an image in mipmap-xxxhdpi in android/app/res.
Example, if you add flutter_launcher_icons to the pubspec.yaml:
dev_dependencies:
flutter_launcher_icons: "^0.7.3"
flutter_icons:
android: "launcher_icon"
ios: true
image_path: "assets/icon/icon.png"
Then execute the following:
flutter pub get
flutter pub run flutter_launcher_icons:main
It will generate all the icons under different sizes in the res folder for android and Assets.xcassets for ios.
Check here for more information:
https://github.com/fluttercommunity/flutter_launcher_icons
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With