listenToNotificationEvents method
void
listenToNotificationEvents()
Implementation
void listenToNotificationEvents() {
AwesomeNotifications().setListeners(
onActionReceivedMethod: (ReceivedAction receivedAction) async {
debugPrint('Notification tapped: ${receivedAction.id}');
// You can add navigation or other logic here
},
onNotificationCreatedMethod: (ReceivedNotification notification) async {
debugPrint('Notification created: ${notification.id}');
},
onDismissActionReceivedMethod: (ReceivedAction action) async {
debugPrint('Notification dismissed: ${action.id}');
},
);
}