You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi !
I got working the package with macOS but now, for an obscure reason, my notifications won't appear
I'm on a M1 MacBook Pro With macOS Sonoma 14.5
Here is my code :
print("App is not focused. Showing desktop notification");
// Display a notification
LocalNotification notification = LocalNotification(
title: notificationData.title,
body: notificationData.content,
);
await notification.show();
print("Sent notification");
My notificationData object is fetched from my API (sent by WebSocket). Even with hard-coded strings, it still not works.
I Initialize the Local Notifier from main() in lib/main.dart with :
// Initialize the Notification Manager
if(Platform.isWindows){
await localNotifier.setup(
appName: 'StudySuite',
// The parameter shortcutPolicy only works on Windows
shortcutPolicy: ShortcutPolicy.requireCreate,
);
}
else{
await localNotifier.setup(
appName: 'StudySuite',
);
(I put a Windows condition for the shortcutPolicy, it is needed ? Made that when my app doesn't send notifications. Before It was the same for macOS and Windows)
Any idea to get my notification working ?
The text was updated successfully, but these errors were encountered:
Hi !
I got working the package with macOS but now, for an obscure reason, my notifications won't appear
I'm on a M1 MacBook Pro With macOS Sonoma 14.5
Here is my code :
My
notificationData
object is fetched from my API (sent by WebSocket). Even with hard-coded strings, it still not works.I Initialize the Local Notifier from
main()
inlib/main.dart
with :(I put a Windows condition for the
shortcutPolicy
, it is needed ? Made that when my app doesn't send notifications. Before It was the same for macOS and Windows)Any idea to get my notification working ?
The text was updated successfully, but these errors were encountered: