admin管理员组文章数量:1122832
Hi i am using awesome notification to show notification so its working fine but showing white circle instead of app logo i tried many ways
1.pass resource://drawable/ic_launcher_foreground
2.modify manifest file and more
but its not working
static Future<void> initialize() async {
await AwesomeNotifications().initialize(
null,
[
NotificationChannel(
channelKey: 'high_importance_channel',
channelName: 'Alerts',
channelDescription: 'Alerts',
playSound: true,
defaultRingtoneType: DefaultRingtoneType.Notification,
enableVibration: true,
defaultColor: Colors.amber,
enableLights: true,
importance: NotificationImportance.High,
defaultPrivacy: NotificationPrivacy.Private,
)
],
debug: false);
initialAction = await AwesomeNotifications()
.getInitialNotificationAction(removeFromActionEvents: false);
}
Hi i am using awesome notification to show notification so its working fine but showing white circle instead of app logo i tried many ways
1.pass resource://drawable/ic_launcher_foreground
2.modify manifest file and more
but its not working
static Future<void> initialize() async {
await AwesomeNotifications().initialize(
null,
[
NotificationChannel(
channelKey: 'high_importance_channel',
channelName: 'Alerts',
channelDescription: 'Alerts',
playSound: true,
defaultRingtoneType: DefaultRingtoneType.Notification,
enableVibration: true,
defaultColor: Colors.amber,
enableLights: true,
importance: NotificationImportance.High,
defaultPrivacy: NotificationPrivacy.Private,
)
],
debug: false);
initialAction = await AwesomeNotifications()
.getInitialNotificationAction(removeFromActionEvents: false);
}
Share
Improve this question
asked Nov 21, 2024 at 13:00
Hari A.RHari A.R
276 bronze badges
1 Answer
Reset to default 0create an icon in this route
android/app/src/main/res/drawable/your_icon_name.png
then edit your code to this
static Future<void> initialize() async {
await AwesomeNotifications().initialize(
"resource://drawable/your_icon_name",
[
NotificationChannel(
channelKey: 'high_importance_channel',
channelName: 'Alerts',
channelDescription: 'Alerts',
playSound: true,
defaultRingtoneType: DefaultRingtoneType.Notification,
enableVibration: true,
defaultColor: Colors.amber,
enableLights: true,
importance: NotificationImportance.High,
defaultPrivacy: NotificationPrivacy.Private,
)
],
debug: false);
initialAction = await AwesomeNotifications()
.getInitialNotificationAction(removeFromActionEvents: false);
}
after do that restart your application
本文标签: flutterAwesome notification icon not showingStack Overflow
版权声明:本文标题:flutter - Awesome notification icon not showing - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736310678a1934465.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论