Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change Flutter local notification icon background color

Hey guys i was wondering how i could change the background color/accent color of the local notification icon. i know for changing firebase messaging icon background we use this

<meta-data android:name="com.google.firebase.messaging.default_notification_color"
              android:resource="@color/background_color" />

but i couldn't find any thing for flutter local notifications, it's always grey. any ideas?

like image 925
Aymen Avatar asked Sep 12 '25 01:09

Aymen


1 Answers

You can change icon color by specifying color in the NotificationDetails. But make sure the icon is monochrome and has a transparent background.

NotificationDetails(
      android: AndroidNotificationDetails('id', 'name', 'des',
          // Specify the color
          color: const Color.fromARGB(255, 255, 0, 0),

          importance: Importance.max),
      iOS: IOSNotificationDetails(),
    );

like image 185
gouravSh Avatar answered Sep 13 '25 14:09

gouravSh