adaptive launcher icons (not working)

This commit is contained in:
Constantin Leue
2026-07-30 06:43:34 +02:00
parent 2f697f1356
commit 07394f79c8
14 changed files with 86 additions and 1 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

+2
View File
@@ -22,6 +22,8 @@ flutter_launcher_icons:
android: true android: true
ios: false ios: false
image_path: "assets/icon/icon.png" image_path: "assets/icon/icon.png"
adaptive_icon_background: "assets/icon/ic_background.png"
adaptive_icon_foreground: "assets/icon/ic_foreground.png"
min_sdk_android: 21 min_sdk_android: 21
environment: environment:
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

+79
View File
@@ -0,0 +1,79 @@
# DMC Launcher Icon – Adaptive Icon Layers
## Warum vorher ein weisser Rand entstand
`flutter_launcher_icons` erzeugt ein Adaptive Icon **nur**, wenn
`adaptive_icon_background` UND `adaptive_icon_foreground` gesetzt sind.
Der `image_path` wird nicht automatisch als Vordergrund uebernommen.
Ohne Adaptive Icon faellt Android auf die Alt-Behandlung zurueck:
Es verkleinert das quadratische Bild und legt es auf weissen Grund,
damit es in die Maskenform passt. Genau das war der weisse Kreis.
## Dateien
| Datei | Inhalt |
|---------------------------|-------------------------------------------|
| `ic_background.png` | Deckend `#160E24` + M in der 66dp-Zone |
| `ic_background_alt_A.png` | Alternative: M fuellt die sichtbaren 72dp |
| `ic_foreground.png` | Transparent + weisses DC (Sicherheitszone)|
| `ic_monochrome.png` | DC-Silhouette fuer Themed Icons |
Alle 432x432 px (= 108dp bei xxxhdpi). SVG-Quellen liegen daneben.
## Warum das M nicht mehr randfuellend ist
Die Maske zeigt nur die inneren 72 von 108 dp (288 von 432 px).
Ein randfuellendes M verliert dadurch 72 px pro Seite.
Gemessener Anteil des sichtbaren M:
| Variante | Kreis | Squircle | Eckig |
|-----------------------------|-------|----------|-------|
| randfuellend (urspruenglich)| 31 % | 36 % | 40 % |
| A – M fuellt die 72dp | 74 % | 90 % | 99 % |
| B – M in der 66dp-Zone | 84 % | 97 % | 100 % |
Ausgeliefert wird B, weil es in **jeder** Maskenform besser
abschneidet als A. Wer das M naeher am Rand moechte, nimmt
`ic_background_alt_A.png`.
Geprueft:
- Hintergrund vollstaendig deckend
- Vordergrund max. 127 px vom Zentrum -> passt in die 132 px Sicherheitszone
- Aeusseres 18dp-Band enthaelt nur Hintergrundfarbe
## pubspec.yaml
```yaml
dev_dependencies:
flutter_launcher_icons: ^0.14.4
flutter_launcher_icons:
android: "launcher_icon"
ios: true
image_path: "assets/launcher/ic_playstore.png"
adaptive_icon_background: "assets/launcher/ic_background.png"
adaptive_icon_foreground: "assets/launcher/ic_foreground.png"
adaptive_icon_monochrome: "assets/launcher/ic_monochrome.png"
```
Danach:
```
flutter clean
dart run flutter_launcher_icons
```
`flutter clean` nicht weglassen - alte Icons werden sonst
oft aus dem Cache weiterverwendet.
## Hinweise
- `image_path` ist der Alt-/iOS-Pfad. Dafuer die eckige Vollversion
nehmen (Y2_pink_dark_square), nicht die Ebenen.
- Fuer den Play Store zusaetzlich 512x512 px, ohne Transparenz.
- Das Benachrichtigungssymbol ist eine eigene Grafik:
weiss auf transparent, in `drawable/`, nicht `mipmap/`.
- Auf einem echten Geraet gegen mehrere Launcher pruefen
(Samsung = Kreis, Pixel = Squircle).
Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 432 432" width="432" height="432"><rect width="432" height="432" fill="#160E24"/><g transform="translate(84.00,84.00) scale(0.515625)"><g transform="scale(0.644025,-0.729345) translate(-62,-702)"><path d="M857 702V0H686V421L529 0H391L233 422V0H62V702H264L461 216L656 702Z" fill="#FF2E93"/></g></g></svg>

After

Width:  |  Height:  |  Size: 356 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 432 432" width="432" height="432"><rect width="432" height="432" fill="#160E24"/><g transform="translate(72.00,72.00) scale(0.562500)"><g transform="scale(0.644025,-0.729345) translate(-62,-702)"><path d="M857 702V0H686V421L529 0H391L233 422V0H62V702H264L461 216L656 702Z" fill="#FF2E93"/></g></g></svg>

After

Width:  |  Height:  |  Size: 356 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

+2
View File
@@ -4,3 +4,5 @@ Install release:
flutter install flutter install
Debug: Debug:
flutter run flutter run
build aufrauemen:
flutter clean