flutter_local_notifications updates

Ios->Darwin, etc.
This commit is contained in:
sneurlax 2024-04-04 18:18:24 -05:00
parent a13b1b6da3
commit f26e6e8b01

View file

@ -1,4 +1,4 @@
/*
/*
* This file is part of Stack Wallet.
*
* Copyright (c) 2023 Cypher Stack
@ -25,17 +25,17 @@ class NotificationApi {
// importance: Importance.max,
priority: Priority.high,
ticker: 'ticker'),
iOS: IOSNotificationDetails(),
macOS: MacOSNotificationDetails(),
iOS: DarwinNotificationDetails(),
macOS: DarwinNotificationDetails(),
);
}
static Future<void> init({bool initScheduled = false}) async {
const android = AndroidInitializationSettings('app_icon_alpha');
const iOS = IOSInitializationSettings();
const iOS = DarwinInitializationSettings();
const linux = LinuxInitializationSettings(
defaultActionName: "temporary_stack_wallet");
const macOS = MacOSInitializationSettings();
const macOS = DarwinInitializationSettings();
const settings = InitializationSettings(
android: android,
iOS: iOS,
@ -44,8 +44,11 @@ class NotificationApi {
);
await _notifications.initialize(
settings,
onSelectNotification: (payload) async {
onNotifications.add(payload);
onDidReceiveNotificationResponse: (payload) async {
onNotifications.add(payload.payload);
},
onDidReceiveBackgroundNotificationResponse: (payload) async {
onNotifications.add(payload.payload);
},
);
}