アプリアイコンを変更する
◎flutter_launcher_iconsパッケージをインストール
ターミナルから flutter pub add flutter_launcher_icons
◎pubspec.yamlを編集する
・dev_depedencies: へflutter_launcher_iconsを追加する
(一部抜粋)
dev_dependencies:
flutter_launcher_icons: ^0.14.4
・flutter_icons:以下を追加する。
(一部抜粋)
flutter_icons:
android: "launcher_icon"
ios: false
image_path: "assets/icon/tsvnote_androidicon.png"
adaptive_icon_foreground: "assets/icon/tsvnote_androidicon.png"
adaptive_icon_background: "#003F71"
・android用のアプリアイコン、ios用は作らない。
・image_pathはアイコン用の画像
・adaptive_icon_foreground: は512x512のイメージファイル(透過色有り)を指定する。
・adaptive_icon_background:は背景色を設定する。
◎アイコン生成
・ターミナルからflutter pub run flutter_launcher_icons:mainと入力する。