Replace the default Flutter icon with a stylised cloud
The app shipped the Flutter template's blue F, which said nothing about what it does and did not match the interface. The launcher icon is now a white cloud on the same seed blue the app themes itself with, so the two read as one product. The icon is drawn rather than hand-edited: tool/generate_icon.py renders it from signed distance fields — a union of three circles and a rounded box — using only the standard library, so regenerating it needs no image toolchain. The shape's framing is derived from its own bounding box, which is what keeps it centred; maintaining the bounds separately from the shape had it drifting off-centre. Adds the adaptive icon and the Android 13 monochrome layer, which were missing entirely. The generator frames the cloud against the 72dp the launcher mask always keeps and adaptive_icon_foreground_inset is 0, so the layer is not shrunk twice and the icon reads at the same size as its neighbours on a home screen. Verified on the emulator: the cloud appears in the app drawer and holds its shape down to 48px. docs/architecture.md records how to regenerate it, including the flutter_launcher_icons 0.14.4 bug that writes a string into a boolean Xcode setting and needs reverting by hand afterwards. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -33,6 +33,11 @@ dev_dependencies:
|
||||
sdk: flutter
|
||||
flutter_lints: ^6.0.0
|
||||
|
||||
# Fans the two generated sources out to every Android density, the adaptive
|
||||
# icon and the iOS set. Build-time only: it writes files into android/ and
|
||||
# ios/, which are committed, so nothing here ships in the app.
|
||||
flutter_launcher_icons: ^0.14.4
|
||||
|
||||
flutter:
|
||||
uses-material-design: true
|
||||
|
||||
@@ -45,3 +50,33 @@ flutter:
|
||||
# the app runnable offline with no credentials.
|
||||
- assets/mock/
|
||||
- assets/mock/frames/
|
||||
|
||||
# Launcher icon, generated from the sources that tool/generate_icon.py draws.
|
||||
# Re-run after changing them:
|
||||
#
|
||||
# python ../tool/generate_icon.py
|
||||
# dart run flutter_launcher_icons
|
||||
flutter_launcher_icons:
|
||||
android: true
|
||||
ios: true
|
||||
image_path: assets/icon/icon.png
|
||||
|
||||
# Adaptive icon: the launcher masks the foreground to its own shape, so the
|
||||
# cloud is drawn inside the safe zone and the app blue fills whatever the mask
|
||||
# leaves. Kept identical to ColorScheme.fromSeed in lib/main.dart.
|
||||
adaptive_icon_background: "#1F6FB2"
|
||||
adaptive_icon_foreground: assets/icon/icon_foreground.png
|
||||
|
||||
# The generator already frames the cloud inside the 72dp safe zone. Left at
|
||||
# its default of 16, this would shrink the layer again and the icon would read
|
||||
# noticeably smaller than every other one on the home screen.
|
||||
adaptive_icon_foreground_inset: 0
|
||||
|
||||
# Android 13 themed icons tint the alpha of this layer with the user's
|
||||
# wallpaper palette. The foreground is a flat white silhouette, so its alpha
|
||||
# is already exactly the cloud.
|
||||
adaptive_icon_monochrome: assets/icon/icon_foreground.png
|
||||
|
||||
# iOS rejects an alpha channel in app icons. The source is opaque anyway;
|
||||
# this drops the channel itself.
|
||||
remove_alpha_ios: true
|
||||
|
||||
Reference in New Issue
Block a user