onNotificationTap method

void onNotificationTap(
  1. NotificationsResponse item
)

Implementation

void onNotificationTap(NotificationsResponse item) {
  // Handle navigation based on notification type or content
  // For example, if the notification has a moduleId, navigate to that module's dashboard
  if (item.moduleId != null) {
    navigationToDashboard(item.moduleId!);
    // navigation.navigateToCustomUrl(item.navigationUrl ?? '');
  } else {
    AppUtils.showSnackBar('No specific action for this notification.');
  }
}