mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-03 17:29:23 +00:00
flutter_local_notifications updates
Ios->Darwin, etc.
This commit is contained in:
parent
a13b1b6da3
commit
f26e6e8b01
1 changed files with 10 additions and 7 deletions
|
@ -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);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue