【Flutter】androidの通知アイコンが反映されない
プッシュ通知のアイコンを設定します。
通知アイコンの作成
下記ページのNotification icon generatorで通知用アイコンを作成します。
通知アイコンを設置
ダウンロードしたデータを解凍します。
中に画像ファイルが入っているので、drawable-(解像度)にある画像ファイルをapp/src/main/res/mipmap-(解像度)のフォルダにコピーします。
Android manifest fileの編集
下記コード追記します。"@drawable/ic_notification" はファイル名(拡張子なし)なので注意
<meta-data android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@drawable/ic_notification" />
追記する場所を間違えないようにしてください
![](https://next-k.site/blog/wp-content/uploads/2022/05/スクリーンショット-2022-05-27-14.13.37.png)
引用:https://github.com/flutter/flutter/issues/17941https://github.com/flutter/flutter/issues/17941
ディスカッション
コメント一覧
まだ、コメントがありません