简体   繁体   English

如何在 flutter 中更改 FCM 通知 colors?

[英]How to change FCM Notification colors in flutter?

There is no any code to change the colors of notification bar from white to red(for eg).没有任何代码可以将通知栏的 colors 从白色更改为红色(例如)。

Try looking at this试试看这个

Customize default notification自定义默认通知

Custom default icon自定义默认图标

Setting a custom default icon allows you to specify what icon is used for notification messages if no icon is set in the notification payload.如果通知有效负载中没有设置图标,设置自定义默认图标允许您指定用于通知消息的图标。 Also use the custom default icon to set the icon used by notification messages sent from the Firebase console.还可以使用自定义默认图标来设置从 Firebase 控制台发送的通知消息使用的图标。 If no custom default icon is set and no icon is set in the notification payload, the application icon (rendered in white) is used.如果未设置自定义默认图标且未在通知负载中设置图标,则使用应用程序图标(呈现为白色)。

Custom default Color自定义默认颜色

You can also define what color is used with your notification.您还可以定义通知使用的颜色。 Different android versions use this settings in different ways: Android < N use this as background color for the icon.不同的 android 版本以不同的方式使用此设置: Android < N 使用此作为图标的背景颜色。 Android >= N use this to color the icon and the app name. Android >= N 使用它为图标和应用程序名称着色。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM