flutter_launcher_iconsパッケージを使うことで、簡単にアプリアイコンが設定できる。
パッケージのインストール
dev_dependencies
flutter_launcher_icons: ^0.14.4
pubspec.yamlに設定を追加
flutter_launcher_icons:
image_path: assets/icon/icon.png
android: true
ios: true
min_sdk_android: 21 # android min sdk min:16, default 21
adaptive_icon_padding: true
adaptive_icon_background: '#000000' #iconの背景色
adaptive_icon_foreground: assets/icon/icon.png
remove_alpha_ios: true # iOSアプリのリジェクト原因の一つ、アルファチャンネルを強制無効にする
設定に反映する
flutter pub run flutter_launcher_icons:main


コメント