From c44f0d1ae2a7566402fd862411fff2526cb25013 Mon Sep 17 00:00:00 2001 From: zach Date: Fri, 2 Jan 2026 14:58:13 -0700 Subject: [PATCH] add notification perms --- lib/services/notification_service.dart | 29 ++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/lib/services/notification_service.dart b/lib/services/notification_service.dart index 6db316d9..09039f07 100644 --- a/lib/services/notification_service.dart +++ b/lib/services/notification_service.dart @@ -18,10 +18,16 @@ class NotificationService { requestBadgePermission: true, requestSoundPermission: true, ); + const macSettings = DarwinInitializationSettings( + requestAlertPermission: true, + requestBadgePermission: true, + requestSoundPermission: true, + ); const initSettings = InitializationSettings( android: androidSettings, iOS: iosSettings, + macOS: macSettings, ); try { @@ -90,9 +96,17 @@ class NotificationService { badgeNumber: badgeCount, ); + final macDetails = DarwinNotificationDetails( + presentAlert: true, + presentBadge: true, + presentSound: true, + badgeNumber: badgeCount, + ); + final notificationDetails = NotificationDetails( android: androidDetails, iOS: iosDetails, + macOS: macDetails, ); await _notifications.show( @@ -128,9 +142,16 @@ class NotificationService { presentSound: true, ); + const macDetails = DarwinNotificationDetails( + presentAlert: true, + presentBadge: true, + presentSound: true, + ); + const notificationDetails = NotificationDetails( android: androidDetails, iOS: iosDetails, + macOS: macDetails, ); await _notifications.show( @@ -169,9 +190,17 @@ class NotificationService { badgeNumber: badgeCount, ); + final macDetails = DarwinNotificationDetails( + presentAlert: true, + presentBadge: true, + presentSound: true, + badgeNumber: badgeCount, + ); + final notificationDetails = NotificationDetails( android: androidDetails, iOS: iosDetails, + macOS: macDetails, ); final preview = _truncateMessage(message, 30);