fluttercommunity / flutter_launcher_icons

Flutter Launcher Icons - A package which simplifies the task of updating your Flutter app's launcher icon. Fully flexible, allowing you to choose what platform you wish to update the launcher icon for and if you want, the option to keep your old launcher icon in case you want to revert back sometime in the future. Maintainer: @MarkOSullivan94
https://pub.dev/packages/flutter_launcher_icons
MIT License
1.99k stars 396 forks source link

Adaptive Icon Scaling for Android #566

Closed claudius-kienle closed 1 week ago

claudius-kienle commented 2 months ago

This is a rebased version of pull request #181, updated to work with the dependencies currently used in flutter_launcher_icons:master.

Since the adaptive icons seems to have extra padding when compared to their iOS counter parts I added a new scaling factor parameter so that the image for the adaptive icon can be scaled before finally scaling down to icon size. This scaling is done by enlarging the canvas, not scaling down the original image, so image quality should in theory be better. The two new yaml parameters are:

adaptive_icon_foreground_scale_factor: 0.66
adaptive_icon_foreground_scale_fill_color: "#FFFFFFFF" #probably not needed as default is fill transparent

Adding background image scaling will be next.

MarkOSullivan94 commented 1 week ago

Thank you for this contribution however this should be fixed now with https://github.com/fluttercommunity/flutter_launcher_icons/pull/563