PushNotification class

Represents a push notification payload for engagement tracking.

Android Reference: com.cometchat.chat.models.PushNotification

This model is provided by the CometChat Push Notification SDK (not constructed by the Chat SDK). The Chat SDK's markPushNotificationDelivered and markPushNotificationClicked methods accept this object as-is from the push SDK's payload parsing.

Constructors

PushNotification({required String id, required String announcementId, String? campaignId, required String source})
Constructs a new PushNotification instance.
const

Properties

announcementId String
Same as id — for clarity in push notification context.
final
campaignId String?
Campaign ID if from a campaign, null otherwise.
final
hashCode int
The hash code for this object.
no setteroverride
id String
Announcement ID from push payload.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
source String
Source of the push notification. Always "campaign" for notification feed pushes.
final

Methods

copyWith({String? id, String? announcementId, String? campaignId, String? source}) PushNotification
Creates a copy of this PushNotification with the given fields replaced.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override