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 395 forks source link

related to [issue #96], Suggestion for an easier way to apply foreground inset #563

Closed LOCKEDFILE closed 1 week ago

LOCKEDFILE commented 3 months ago

I requested a PR for those who find it bothersome to change it manually every time. The default value for the inset is 16.

how to use:

flutter_launcher_icons:
  android: true
  ios: true
  remove_alpha_ios: true
  image_path: "assets/app_icon/icon.png"
  adaptive_icon_background: "assets/app_icon/adaptive_icon_background.png"
  adaptive_icon_foreground: "assets/app_icon/adaptive_icon_foreground.png"
  adaptive_icon_foreground_inset: 16  # default value is 16

before:

<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
  <background android:drawable="@drawable/ic_launcher_background"/>
  <foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>

after:

<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
  <background android:drawable="@drawable/ic_launcher_background"/>
  <foreground>
    <inset
      android:drawable="@drawable/ic_launcher_foreground"
      android:inset="16%" />
  </foreground>
</adaptive-icon>
iakdis commented 1 month ago

Hi there, this is a great new feature. Is there anything preventing this PR from being merged? @MarkOSullivan94 @RatakondalaArun

This would be by the way a solution for this issue: #96.

martinbutt commented 3 weeks ago

Just tested this and it works perfectly.

MarkOSullivan94 commented 2 weeks ago

Thank you for your contribution @LOCKEDFILE and thank you for testing @martinbutt

LOCKEDFILE commented 2 weeks ago

@MarkOSullivan94, thanks you for your comments.

i fixed monochorome insets and multi line styling.

MarkOSullivan94 commented 1 week ago

Thanks for making the requested changes @LOCKEDFILE