icon notification in statusbar in flutter


I use flutter_local_notification for manage fcm notification in flutter.
for show icon in StatusBar, add logo png file in drawable and use it.

my image is white, when StatusBar is white, icon not appears.
another apps like whatsapp, notification icon color changed based Appbar color.
How to solve this problem?


try generate the icon for your notification using this link https://romannurik.github.io/AndroidAssetStudio/icons-notification.html then make sure you has defined the icon in your initializatuon, example for Android:

const AndroidInitializationSettings('@drawable/ic_firebase_notification');

and add this code inside the application tag in AndroidManifext.xml file.

<!-- Add custom icon to the notifications -->
<meta-data android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@drawable/ic_firebase_notification" />

and don’t forget to put the icon that you generated before to android/app/src/main/res/drawable/ folder. i tried this before, and it worked like a charm in my case.

Answered By – Nazarudin

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published