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