【发布时间】:2021-07-09 05:57:06
【问题描述】:
我想使用颤振在通知中显示一个小部件。我正在使用 awesome_notifications 包,但我无法达到同样的效果。
Future<void> triggerNotification() async{
await AwesomeNotifications().createNotification(
content: NotificationContent(
id: 1,
channelKey: 'key1',
title: 'This is Notification title',
body: 'This is Body of Noti',
bigPicture: 'https://protocoderspoint.com/wp-content/uploads/2021/05/Monitize-flutter-app-with-google-admob-min-741x486.png',
notificationLayout: NotificationLayout.BigPicture
),
);
}
在这个sn-p中有bigPicture参数,需要图片的url。我已使用 repaintBoundary 将小部件转换为图像。有什么方法可以传递图像小部件而不是 url?谢谢。
【问题讨论】:
标签: android flutter notifications flutter-notification