Home > database >  how to change icon on Android notification tray using flutter local notification?
how to change icon on Android notification tray using flutter local notification?

Time:06-27

I am using enter image description here

but when I open the Android notification tray, the icon is just white, it doesn't show my icon like this

enter image description here

so how to change icon on Android notification tray using flutter local notification?

currently I am using flutter_local_notifications: ^9.6.1

CodePudding user response:

while initialization, did you use this


// initialise the plugin. app_icon needs to be a added as a drawable resource to the Android head project
const AndroidInitializationSettings initializationSettingsAndroid =
    AndroidInitializationSettings('app_icon');

Now we need to add our icon as a drawable resource to the Android head project. Here’s the full path for doing this:

YOUR_APPLICATION_FOLDER_NAME\android\app\src\main\res\drawable\YOUR_APP_ICON.png

CodePudding user response:

sometimes its problem with the icon. you need to replace it with some other icon and try. there is site you can use for icon generating and testing the image type. LINK

  • Related