👽 Update the notify due to the API changes
This commit is contained in:
@@ -55,7 +55,7 @@ Future<void> initializeLocalNotifications() async {
|
|||||||
);
|
);
|
||||||
|
|
||||||
await flutterLocalNotificationsPlugin.initialize(
|
await flutterLocalNotificationsPlugin.initialize(
|
||||||
initializationSettings,
|
settings: initializationSettings,
|
||||||
onDidReceiveNotificationResponse: (NotificationResponse response) async {
|
onDidReceiveNotificationResponse: (NotificationResponse response) async {
|
||||||
final payload = response.payload;
|
final payload = response.payload;
|
||||||
if (payload != null) {
|
if (payload != null) {
|
||||||
@@ -125,10 +125,10 @@ StreamSubscription<WebSocketPacket> setupNotificationListener(
|
|||||||
android: androidNotificationDetails,
|
android: androidNotificationDetails,
|
||||||
);
|
);
|
||||||
await flutterLocalNotificationsPlugin.show(
|
await flutterLocalNotificationsPlugin.show(
|
||||||
0,
|
id: 0,
|
||||||
notification.title,
|
title: notification.title,
|
||||||
notification.content,
|
body: notification.content,
|
||||||
notificationDetails,
|
notificationDetails: notificationDetails,
|
||||||
payload: notification.meta['action_uri'] as String?,
|
payload: notification.meta['action_uri'] as String?,
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user