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?
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(),
);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With